Package org.zkoss.stateless.sul
Class IComponentCtrl
- java.lang.Object
-
- org.zkoss.stateless.sul.IComponentCtrl
-
public class IComponentCtrl extends java.lang.ObjectAn addition interface toIComponentthat is used for implementation or tools.- Author:
- jumperchen
-
-
Constructor Summary
Constructors Constructor Description IComponentCtrl()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanhasAction(IComponent iComponent)static booleanisBuiltinType(java.lang.Class<?> type)Tests if the giventypeis a built-in typestatic booleanisDateType(java.lang.Class<?> type)Tests if the giventypeis Java Date type.static booleanisFileType(java.lang.Class<?> type)Tests if the giventypeisFileData.static booleanisPojo(java.lang.Class<?> type)Tests if the giventypeis Java POJO-like object.static booleanisPrimitive(java.lang.Class<?> type)Tests if the giventypeis primitive type or primitive object type.static ActionlookupActionAnnotation(ActionHandler actionHandler, java.lang.reflect.Method method)Looks up the@Actionannotation on the given method if any.static voidrenderActions(java.util.List<ActionHandler> actionHandlerList, StatelessContentRenderer renderer)Rendersactionsto client widget with its bound parameters.
-
-
-
Method Detail
-
renderActions
public static void renderActions(java.util.List<ActionHandler> actionHandlerList, StatelessContentRenderer renderer) throws java.io.IOException
Rendersactionsto client widget with its bound parameters.- Parameters:
actionHandlerList-renderer-- Throws:
java.io.IOException
-
isPrimitive
public static boolean isPrimitive(java.lang.Class<?> type)
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
public static boolean isPojo(java.lang.Class<?> type)
Tests if the giventypeis Java POJO-like object.- Parameters:
type- A class to test with- Returns:
trueif it's the POJO object type.
-
isDateType
public static boolean isDateType(java.lang.Class<?> type)
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
public static boolean isBuiltinType(java.lang.Class<?> type)
Tests if the giventypeis a built-in type- Parameters:
type- a class to test with- Returns:
trueif it's a built-in type.
-
isFileType
public static boolean isFileType(java.lang.Class<?> type)
Tests if the giventypeisFileData.- Parameters:
type- A class to test with- Returns:
trueif it's aFileData.
-
lookupActionAnnotation
public static Action lookupActionAnnotation(ActionHandler actionHandler, java.lang.reflect.Method method)
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
public static boolean hasAction(IComponent iComponent)
- Parameters:
iComponent- The immutable component to test with.- Returns:
true, if it contains.
-
-