Interface MutableComponentModel

    • Method Detail

      • addParameter

        void addParameter​(String name,
                          boolean required,
                          boolean allowNull,
                          String defaultBindingPrefix)
        Adds a new formal parameter to the model. Each parameter has a unique name (though access to parameters is case insensitive).
        Parameters:
        name - new, unique name for the parameter
        required - if true, the parameter must be bound
        allowNull - if true, then parameter may be bound to null, if false a null check will be added
        defaultBindingPrefix - the default binding prefix for this parameter @throws IllegalArgumentException if a parameter with the given name has already been defined for this model
        See Also:
        Parameter
      • addParameter

        void addParameter​(String name,
                          boolean required,
                          boolean allowNull,
                          String defaultBindingPrefix,
                          boolean cached)
        Adds a new formal parameter to the model. Each parameter has a unique name (though access to parameters is case insensitive).
        Parameters:
        name - new, unique name for the parameter
        required - if true, the parameter must be bound
        allowNull - if true, then parameter may be bound to null, if false a null check will be added
        defaultBindingPrefix - the default binding prefix for this parameter @throws IllegalArgumentException if a parameter with the given name has already been defined for this model
        cached - if true, the parameter value should be cached within the component during rendering
        Since:
        5.2.0.0
        See Also:
        Parameter
      • addEmbeddedComponent

        MutableEmbeddedComponentModel addEmbeddedComponent​(String id,
                                                           String type,
                                                           String componentClassName,
                                                           boolean inheritInformalParameters,
                                                           Location location)
        Defines a new embedded component.
        Parameters:
        id - the unique id for the embedded component, which must not already exist.
        type - the type of the component (posslibly blank)
        componentClassName - the fully qualified class name (derived from the field), used if the type is blank
        inheritInformalParameters - if true, then the component will inherit informal parameters provided to its container
        location - where the component is defined @return a mutable model allowing parameters to be set
      • addMixinClassName

        void addMixinClassName​(String mixinClassName,
                               String... order)
        Adds a mixin to the component's implementation, optionally specifying ordering constraints, as per OrderedConfiguration.
        Since:
        5.2.0.0
      • enableSupportsInformalParameters

        void enableSupportsInformalParameters()
        Sets the internal flag to indicate that this model (and all models that extend from it) support informal parameters.
      • setMixinAfter

        void setMixinAfter​(boolean mixinAfter)
        Changes the value of the mixinAfter flag. The default value is false.
      • setMeta

        void setMeta​(String key,
                     String value)
        Stores a meta data value under the indicated key.
      • addEventHandler

        void addEventHandler​(String eventType)
        Identifies that the component includes an event handler for the indicated event type.
        Parameters:
        eventType - of handled event
        Since:
        5.1.0.0