Class NmActionDataUtility
- All Implemented Interfaces:
DataUtility
To have this data utility return an Actions hyperlink to some other action model use the "actionModel"
property. In a builder it would be like:
ColumnConfig col =
factory.newColumnConfig(DescriptorConstants.ColumnIdentifiers.NM_ACTIONS,false); or from a data utility sub class it would be like:
col.setActionModel(<action_model_name>);
tableConfig.addComponent(col);
descriptor.setProperty(DescriptorConstants.ActionProperties.ACTION_MODEL,
"<action_model_name>"); Where <action_model_name> is the name of some action model
in an actionmodels.xml.
Its preferred to put actions in the actions menu rather than displaying them as action icons. But it is possible to
have this data utility return an NmAction that would display as an action icon. To do this create a subclass,
override setModelData() and set the objectType and actionName properties on the descriptor. For example:
descriptor.setProperty(DescriptorConstants.ActionProperties.ACTION_NAME,
"<action_name>"); Where <action_name> and <object_type> are the name and type
of an action specified in an actions.xml file.
descriptor.setProperty(DescriptorConstants.ActionProperties.OBJECT_TYPE,
"<object_type>");
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptiongetDataValue(String component_id, Object datum, ModelContext mc) For detailed description checkDataUtility#getDataValue(String, Object, ModelContext)
Supported API: true
Extendable: true
-
Method Details
-
getDataValue
For detailed description checkDataUtility#getDataValue(String, Object, ModelContext)
Supported API: true
Extendable: true- Parameters:
component_id- The id to build a view object fordatum- The object to extract model data frommc- The context in which the component model data is being extracted- Returns:
- An object that can be sent to a view for rendering
- Throws:
WTException- If a problem occurs while extracting the data
-