Class ClientBindComposer<T extends Component>

    • Field Detail

      • log

        protected static final org.slf4j.Logger log
      • VALIDATION_MESSAGE_ID

        protected static final java.lang.String VALIDATION_MESSAGE_ID
        See Also:
        Constant Field Values
      • VALUE_ANNO_ATTR

        protected static final java.lang.String VALUE_ANNO_ATTR
        See Also:
        Constant Field Values
      • VALIDATION_MESSAGES_ATTR

        protected static final java.lang.String VALIDATION_MESSAGES_ATTR
        See Also:
        Constant Field Values
      • QUEUE_NAME_ANNO_ATTR

        protected static final java.lang.String QUEUE_NAME_ANNO_ATTR
        See Also:
        Constant Field Values
      • QUEUE_SCOPE_ANNO_ATTR

        protected static final java.lang.String QUEUE_SCOPE_ANNO_ATTR
        See Also:
        Constant Field Values
      • UPDATE_BINDING_CMD

        protected static final java.lang.String UPDATE_BINDING_CMD
        See Also:
        Constant Field Values
      • UPDATE_BINDING_DATA

        protected static final java.lang.String UPDATE_BINDING_DATA
        See Also:
        Constant Field Values
      • UPDATE_SELECTION_DATA

        protected static final java.lang.String UPDATE_SELECTION_DATA
        See Also:
        Constant Field Values
      • VALIDATE_BINDING_CMD

        protected static final java.lang.String VALIDATE_BINDING_CMD
        See Also:
        Constant Field Values
      • VALIDATE_BINDING_DATA

        protected static final java.lang.String VALIDATE_BINDING_DATA
        See Also:
        Constant Field Values
      • VALIDATE_BINDING_PROPERTY

        protected static final java.lang.String VALIDATE_BINDING_PROPERTY
        See Also:
        Constant Field Values
      • VALIDATE_BINDING_COMPONENT_PROPERTY

        protected static final java.lang.String VALIDATE_BINDING_COMPONENT_PROPERTY
        See Also:
        Constant Field Values
      • VALIDATE_SAVE_FORM_BINDING

        protected static final java.lang.String VALIDATE_SAVE_FORM_BINDING
        See Also:
        Constant Field Values
      • REMOTE_CONVERTER_CMD

        protected static final java.lang.String REMOTE_CONVERTER_CMD
        See Also:
        Constant Field Values
      • FETCH_BEAN_DATA_CMD

        protected static final java.lang.String FETCH_BEAN_DATA_CMD
        See Also:
        Constant Field Values
      • REMOTE_CLEAR_VALIDATION_MESSAGE_CMD

        protected static final java.lang.String REMOTE_CLEAR_VALIDATION_MESSAGE_CMD
        See Also:
        Constant Field Values
      • TREEITEM_OPEN_CMD

        protected static final java.lang.String TREEITEM_OPEN_CMD
        See Also:
        Constant Field Values
      • TREE_MODEL_SELECTION_CMD

        protected static final java.lang.String TREE_MODEL_SELECTION_CMD
        See Also:
        Constant Field Values
      • LIST_MODEL_SELECTION_CMD

        protected static final java.lang.String LIST_MODEL_SELECTION_CMD
        See Also:
        Constant Field Values
      • LIST_SUBMODEL_CMD

        protected static final java.lang.String LIST_SUBMODEL_CMD
        See Also:
        Constant Field Values
      • LIST_SUBMODEL_SELECTION_CMD

        protected static final java.lang.String LIST_SUBMODEL_SELECTION_CMD
        See Also:
        Constant Field Values
      • TO_STRING_CONVERTER

        protected static final java.lang.String TO_STRING_CONVERTER
        See Also:
        Constant Field Values
      • COMMAND_TRACKING_ARGUMENTS

        public static final java.lang.String COMMAND_TRACKING_ARGUMENTS
        See Also:
        Constant Field Values
      • COMMAND_TRACKING_ARGUMENTS_CHANGES

        public static final java.lang.String COMMAND_TRACKING_ARGUMENTS_CHANGES
        See Also:
        Constant Field Values
      • WRAPPED_RAW_VALUE

        public static final java.lang.String WRAPPED_RAW_VALUE
        See Also:
        Constant Field Values
      • WRAPPED_STRING_VALUE

        public static final java.lang.String WRAPPED_STRING_VALUE
        See Also:
        Constant Field Values
      • WRAPPED_FORMAT_VALUE

        public static final java.lang.String WRAPPED_FORMAT_VALUE
        See Also:
        Constant Field Values
      • LOCAL_DATE_POSTFIX

        public static final java.lang.String LOCAL_DATE_POSTFIX
        See Also:
        Constant Field Values
      • LOCAL_DATE_TIME_POSTFIX

        public static final java.lang.String LOCAL_DATE_TIME_POSTFIX
        See Also:
        Constant Field Values
      • LOCAL_TIME_POSTFIX

        public static final java.lang.String LOCAL_TIME_POSTFIX
        See Also:
        Constant Field Values
      • DISABLE_CLIENT_UPDATE

        public static final java.lang.String DISABLE_CLIENT_UPDATE
        See Also:
        Constant Field Values
      • RENDER_ALL_TREE_DATA

        public static final java.lang.String RENDER_ALL_TREE_DATA
        See Also:
        Constant Field Values
      • dependsOnMap

        public final java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.util.Set<java.lang.String>>> dependsOnMap
      • modelToListModel

        public final java.util.Map<java.lang.Object,​ListModel> modelToListModel
      • modelToTreeModel

        public final java.util.Map<java.lang.Object,​TreeModel> modelToTreeModel
      • modelRodSizeMap

        public final java.util.Map<java.lang.Object,​java.lang.Integer> modelRodSizeMap
    • Constructor Detail

      • ClientBindComposer

        public ClientBindComposer()
      • ClientBindComposer

        public ClientBindComposer​(boolean isClientWidgetOnly)
    • Method Detail

      • getViewModel

        public java.lang.Object getViewModel()
      • addConverter

        public void addConverter​(java.lang.String name,
                                 Converter converter)
      • renderProperties

        public void renderProperties​(ContentRenderer contentRenderer)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • doAfterCompose

        public void doAfterCompose​(T comp)
                            throws java.lang.Exception
        Description copied from interface: Composer
        Invokes after ZK loader creates this component, initializes it and composes all its children, if any.
        Specified by:
        doAfterCompose in interface Composer<T extends Component>
        Parameters:
        comp - the component has been composed
        Throws:
        java.lang.Exception
      • traverseComponentBindings

        protected void traverseComponentBindings​(Component comp)
      • processPropertyBinding

        public static void processPropertyBinding​(java.util.Map<java.lang.String,​java.lang.Object> allBindings,
                                                  java.lang.String prop,
                                                  java.lang.String annot,
                                                  java.util.Map<java.lang.String,​java.lang.String[]> propertyBinding)
        Internal used only
      • processPropertyBinding

        public static void processPropertyBinding​(java.util.Map<java.lang.String,​java.lang.Object> allBindings,
                                                  java.lang.String prop,
                                                  java.lang.String annot,
                                                  java.util.Map<java.lang.String,​java.lang.String[]> propertyBinding,
                                                  boolean multiple)
        Internal used only
      • handleModel

        public void handleModel​(java.util.Map<java.lang.String,​java.lang.Object> allBindings,
                                Component comp,
                                java.lang.String expr,
                                java.util.Map<java.lang.String,​java.lang.String[]> converterInfo)
      • doBeforeCompose

        public ComponentInfo doBeforeCompose​(Page page,
                                             Component component,
                                             ComponentInfo componentInfo)
                                      throws java.lang.Exception
        Description copied from interface: ComposerExt
        Invokes before composing a component. If you want to manipulate the specified component info, you can use ComponentInfo.duplicate() to make a copy and then modify it such that it won't affect the default behavior.
        Specified by:
        doBeforeCompose in interface ComposerExt<T extends Component>
        Parameters:
        page - the page for composing this component.
        component - the parent component, or null if it is the root component.
        componentInfo - the component info used to instantiate the component. Notice that it is null if the page is rendered as ZK JSP, since ComponentInfo is not available under ZK JSP.
        Returns:
        the component info used to instantiate the component. In most case, it shall return compInfo. If null is returned, the component won't be instantiated. In other words, it is ignored.
        Throws:
        java.lang.Exception
      • doBeforeComposeChildren

        public void doBeforeComposeChildren​(T comp)
                                     throws java.lang.Exception
        Description copied from interface: ComposerExt
        Invokes after the component is instantiated and initialized, but before composing any child.
        Specified by:
        doBeforeComposeChildren in interface ComposerExt<T extends Component>
        Parameters:
        comp - the component being composed
        Throws:
        java.lang.Exception
      • doBeforeComposeChildren0

        protected void doBeforeComposeChildren0​(T comp,
                                                java.lang.Object vmObject)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initInnerViewModel

        protected java.lang.Object initInnerViewModel​(BindEvaluatorX evalx,
                                                      Component comp,
                                                      java.lang.String vmname,
                                                      java.lang.Object vm)
      • doCatch

        public boolean doCatch​(java.lang.Throwable throwable)
                        throws java.lang.Exception
        Description copied from interface: ComposerExt
        Called when an exception occurs when composing the component.

        If you don't want to handle the exception, simply returns false. boolean doCatch(Throwable ex) {return false;}

        An exception thrown in this method is simply logged. It has no effect on the execution. If you want to ignore the exception, just return true.

        Specified by:
        doCatch in interface ComposerExt<T extends Component>
        Parameters:
        throwable - the exception being thrown
        Returns:
        whether to ignore the exception. If false is returned, the exception will be re-thrown. Note: once a composer's doCatch returns true, the exception will be ignored and it means doCatch of the following composers won't be called.
        Throws:
        java.lang.Exception
      • service

        public boolean service​(AuRequest request,
                               boolean everError)
        Description copied from interface: AuService
        Handles an AU request.
        Specified by:
        service in interface AuService
        Parameters:
        request - the request sent from the client.
        everError - whether any error ever occurred before processing this request.
        Returns:
        whether the request has been processed. If false is returned, the default process (handled by the component) will take place.
      • evalExpression

        protected java.lang.Object evalExpression​(Component target,
                                                  java.lang.String expression)
      • findConverter

        protected Converter findConverter​(Component target,
                                          java.lang.String expr)
      • prepareConverterContext

        protected BindContext prepareConverterContext​(Component target,
                                                      java.util.Map<java.lang.String,​java.lang.Object> paramsFromClient)
      • doConvertCoerceToBean

        protected java.lang.Object doConvertCoerceToBean​(java.lang.Object origin,
                                                         Component comp,
                                                         java.lang.String converterExpr,
                                                         java.util.Map<java.lang.String,​java.lang.Object> coverterParams)
      • coerceToBeanProp

        protected java.lang.Object coerceToBeanProp​(java.lang.Object bean,
                                                    java.lang.String prop,
                                                    java.lang.Object value)
      • doValidate

        protected boolean doValidate​(java.util.Map<java.lang.String,​java.lang.Object> validatorData,
                                     java.util.Map<java.lang.String,​java.lang.Object> validatorProperty,
                                     java.lang.Object bean,
                                     Component comp,
                                     java.lang.String prop,
                                     java.lang.Object value)
      • setCachedBeanById

        public void setCachedBeanById​(java.lang.String id,
                                      java.lang.Object data)
      • getCachedFormBeanById

        protected java.lang.Object getCachedFormBeanById​(java.lang.String id)
      • setCachedFormBeanById

        protected void setCachedFormBeanById​(java.lang.String id,
                                             java.lang.Object data)
      • clearCachedFormBeans

        protected void clearCachedFormBeans()
      • initCachedFormBeans

        protected void initCachedFormBeans()
      • getBeanUid

        public java.lang.String getBeanUid​(java.lang.Object bean)