Interface Widget

    • Method Detail

      • getId

        String getId()
        Returns the widget id, unique within the facelet context.
      • setId

        void setId​(String id)
        Sets the widget id, unique within the facelet context.
      • getName

        String getName()
        Returns the widget name used to identify it within a layout.
      • getType

        String getType()
        Returns the widget type used to render it.
      • setValueName

        void setValueName​(String valueName)
        Sets the value name used to compute tag attributes.
      • getMode

        String getMode()
        Returns the widget mode.

        This mode can be different from the layout mode.

      • isTranslated

        boolean isTranslated()
        Returns true if all labels are messages that need to be translated.

        Defaults to false.

      • isHandlingLabels

        boolean isHandlingLabels()
        Returns true if the widget is handling his own labels display (usual label and help label). This can be checked by the layout template to render the widget using both label and widget usual places.

        Defaults to false.

        Since:
        5.6
      • getProperties

        Map<String,​SerializablegetProperties()
        Get properties to use in this mode.

        The way that properties will be mapped to rendered components is managed by the widget type.

      • getProperty

        Serializable getProperty​(String name)
        Returns property with given name in this mode.
        Parameters:
        name - the property name.
        Returns:
        the property value or null if not found.
      • setProperty

        void setProperty​(String name,
                         Serializable value)
        Sets property with given name on the layout. If there is already a property with this name on the widget, it will be overridden.
        Parameters:
        name - the property name.
        value - the property value or null if not found.
        Since:
        5.3.2
      • isRequired

        boolean isRequired()
        Returns true if the widget is required.

        This is a short link for the "required" property, already evaluated from an EL expression (if needed). Defaults to false.

      • getLevel

        int getLevel()
        Returns the widget level in the widget hierarchy.

        For instance a standard widget will have a level of 0, and its potential subwidgets will have a level of 1.

      • getRenderingInfos

        List<RenderingInfogetRenderingInfos()
        Returns the list of rendering information.

        Useful for preview management where some configuration needs to be changed: what's changed can be set as rendering information here to be displayed.

        Since:
        5.5
      • isGlobal

        boolean isGlobal()
        Returns true if the widget is defined globally (as opposed to being held by a layout definition).
        Since:
        6.0
      • isDynamic

        boolean isDynamic()
        Returns true if this widget was generated from configuration on a service, and not generated on-the-fly using dynamic behaviors.
        Since:
        6.0
      • getDefinition

        WidgetDefinition getDefinition()
        Returns the definition from which this widget instance was generated.

        Useful in dev mode to show the corresponding configuration in the UI.

        Since:
        6.0