Class ResourceModel

    • Constructor Detail

      • ResourceModel

        public ResourceModel​(String resourceKey)
        Constructor
        Parameters:
        resourceKey - key of the resource this model represents
      • ResourceModel

        public ResourceModel​(String resourceKey,
                             String defaultValue)
        Constructor
        Parameters:
        resourceKey - key of the resource this model represents
        defaultValue - value that will be returned if resource does not exist
      • ResourceModel

        public ResourceModel​(String resourceKey,
                             IModel<String> defaultValue)
    • Method Detail

      • getObject

        public String getObject()
        Description copied from interface: IModel
        Gets the model object.
        Specified by:
        getObject in interface IModel<String>
        Returns:
        The model object
      • setObject

        public final void setObject​(String object)
        Description copied from interface: IModel
        Sets the model object.
        Specified by:
        setObject in interface IModel<String>
        Parameters:
        object - The model object
      • wrapOnAssignment

        public IWrapModel<String> wrapOnAssignment​(Component component)
        Description copied from interface: IComponentAssignedModel
        This method is called when the component gets its model assigned. WARNING: Because the model can be assigned in the constructor of component this method can also be called with a 'this' of a component that is not fully constructed yet.
        Specified by:
        wrapOnAssignment in interface IComponentAssignedModel<String>
        Returns:
        The WrapModel that wraps this model