Class XButtonDescriptor

  • All Implemented Interfaces:
    Serializable

    public final class XButtonDescriptor
    extends Object
    implements Serializable
    Encapsulates the JSON object of a button of a XButtonList and provides access to the button's properties.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Constructor Detail

      • XButtonDescriptor

        public XButtonDescriptor​(XItem buttonList,
                                 com.alibaba.fastjson.JSONObject jsonObject)
        Creates a new button descriptor for a XButtonList item and a given JSON object with the data of one the buttons of that button list item.
        Parameters:
        buttonList - The XButtonList item that contains the button.
        jsonObject - The data of the button, see XPropertyEnum.buttons.
      • XButtonDescriptor

        public XButtonDescriptor​(XItemRenderData renderData,
                                 com.alibaba.fastjson.JSONObject jsonObject)
        Creates a new button descriptor for a XButtonList item and a given JSON object with the data of one the buttons of that button list item.
        Parameters:
        renderData - Properties of the XButtonList item that contains the button.
        jsonObject - The data of the button, see XPropertyEnum.buttons.
    • Method Detail

      • getAction

        public XButtonActionDescriptor getAction()
        Returns:
        The action that is executed when the button is pressed.
      • getButtonListId

        public String getButtonListId()
        Returns:
        The ID of the XButtonList element that contains this button.
      • getButtonListName

        public String getButtonListName()
        Returns:
        The name of the XButtonList element that contains this button.
      • getI18nTitle

        public String getI18nTitle​(IXFormRenderConfig config)
        Parameters:
        config - Render config to use for replacing placeholders.
        Returns:
        The localized value for getTitle(), depending on the currently requested language, with all placeholders replaced.
      • getI18nValue

        public String getI18nValue​(IXFormRenderConfig config)
        Parameters:
        config - Render config to use for replacing placeholders.
        Returns:
        The localized value for getValue(), depending on the currently requested language, with all placeholders replaced.
      • getName

        public String getName()
        Returns:
        The technical name of the button, such as btnSubmit.
      • getTitle

        public String getTitle()
        Returns:
        The title of the button, i.e. the tooltip that is shown when the user hovers over the button with the mouse.
      • getValue

        public String getValue()
        Returns:
        The display name of the button.