Package de.xima.fc.form.common.models
Class XButtonDescriptor
java.lang.Object
de.xima.fc.form.common.models.XButtonDescriptor
- All Implemented Interfaces:
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:
-
Constructor Summary
ConstructorsConstructorDescriptionXButtonDescriptor
(XItem buttonList, com.alibaba.fastjson.JSONObject jsonObject) Creates a new button descriptor for aXButtonList
item and a given JSON object with the data of one the buttons of that button list item.XButtonDescriptor
(XItemRenderData renderData, com.alibaba.fastjson.JSONObject jsonObject) Creates a new button descriptor for aXButtonList
item and a given JSON object with the data of one the buttons of that button list item. -
Method Summary
Modifier and TypeMethodDescriptionstatic Iterable<XButtonDescriptor>
eachButton
(XItem buttonList) getI18nTitle
(IXFormRenderConfig config) getI18nValue
(IXFormRenderConfig config) getName()
getTitle()
getValue()
toString()
-
Constructor Details
-
XButtonDescriptor
Creates a new button descriptor for aXButtonList
item and a given JSON object with the data of one the buttons of that button list item.- Parameters:
buttonList
- TheXButtonList
item that contains the button.jsonObject
- The data of the button, seeXPropertyEnum.buttons
.
-
XButtonDescriptor
Creates a new button descriptor for aXButtonList
item and a given JSON object with the data of one the buttons of that button list item.- Parameters:
renderData
- Properties of theXButtonList
item that contains the button.jsonObject
- The data of the button, seeXPropertyEnum.buttons
.
-
-
Method Details
-
getAction
- Returns:
- The action that is executed when the button is pressed.
-
getButtonListId
- Returns:
- The
ID
of theXButtonList
element that contains this button.
-
getButtonListName
- Returns:
- The
name
of theXButtonList
element that contains this button.
-
getI18nTitle
- 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
- 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
- Returns:
- The technical name of the button, such as
btnSubmit
.
-
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
- Returns:
- The display name of the button.
-
toString
-
eachButton
- Parameters:
buttonList
- A form item of typeXButtonList
.- Returns:
- All buttons of the given button list.
-