Package org.zkoss.stateless.sul
Class IComponentCtrl
java.lang.Object
org.zkoss.stateless.sul.IComponentCtrl
An addition interface to
IComponent
that is used for implementation or tools.- Author:
- jumperchen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanhasAction(IComponent iComponent) static booleanisBuiltinType(Class<?> type) Tests if the giventypeis a built-in typestatic booleanisDateType(Class<?> type) Tests if the giventypeis Java Date type.static booleanisFileType(Class<?> type) Tests if the giventypeisFileData.static booleanTests if the giventypeis Java POJO-like object.static booleanisPrimitive(Class<?> type) Tests if the giventypeis primitive type or primitive object type.static ActionlookupActionAnnotation(ActionHandler actionHandler, Method method) Looks up the@Actionannotation on the given method if any.static voidrenderActions(List<ActionHandler> actionHandlerList, StatelessContentRenderer renderer) Rendersactionsto client widget with its bound parameters.
-
Constructor Details
-
IComponentCtrl
public IComponentCtrl()
-
-
Method Details
-
renderActions
public static void renderActions(List<ActionHandler> actionHandlerList, StatelessContentRenderer renderer) throws IOException Rendersactionsto client widget with its bound parameters.- Parameters:
actionHandlerList-renderer-- Throws:
IOException
-
isPrimitive
Tests if the giventypeis primitive type or primitive object type.- Parameters:
type- A class to test with- Returns:
trueif it's the primitive type or primitive object type.
-
isPojo
Tests if the giventypeis Java POJO-like object.- Parameters:
type- A class to test with- Returns:
trueif it's the POJO object type.
-
isDateType
Tests if the giventypeis Java Date type.Note: only support the types in
jackson.datatype.jsr310- Parameters:
type- A class to test with- Returns:
trueif it's the Java Date type.
-
isBuiltinType
Tests if the giventypeis a built-in type- Parameters:
type- a class to test with- Returns:
trueif it's a built-in type.
-
isFileType
Tests if the giventypeisFileData.- Parameters:
type- A class to test with- Returns:
trueif it's aFileData.
-
lookupActionAnnotation
Looks up the@Actionannotation on the given method if any.- Parameters:
actionHandler- The lookup action handler.method- The lookup action method- Returns:
- Action if found or
nullis assumed.
-
hasAction
- Parameters:
iComponent- The immutable component to test with.- Returns:
true, if it contains.
-