Class TestActionDynamicContentDelegate
- All Implemented Interfaces:
ActionDynamicContentDelegate
TestActionDynamicContentDelegate is an example which explains how to dynamically define the properties of any action viz action label/tooltips/icons/urls. Extend the DefaultActionDynamicContentDelegate and override the methods in it depending on the requirement. If any other property other than label,tooltips,icons,urls needs to be overridden, override the update method. The default implementation of update method will take care of four properties viz. label,tooltips,icons,and url. The update method will return a hashmap where the key in the hashmap will be the property name and value will be the actual changed value for that property. For example , the property names that should be used as a key in the hashmap if we need to change tooltip, icon , label and url are as follows. tooltip - > for changing the tooltip. icon - > for changing the icon. desc - > for changing the label url - > for changing the url. If user wants to override just a single property out of label,tooltips,icons and urls, then the appropriate method from the base class needs to be overridden. For e.g. if only icon is to be changed , override only the getIcon() method.This method will return the change path for the icon. getContextObjRef() and getContainer() are the two methods which allows the user to narrow down the scope and change the properties of particular action only in the specific context and in the specific conatainer.
Supported API: true
Extendable: true
-
Method Summary
-
Method Details
-
getLabel
Changes the value of the attribute: Label. This will change the default label value and change the NmAction instance with the new value return from this method.
Supported API: true- Specified by:
getLabelin interfaceActionDynamicContentDelegate- Overrides:
getLabelin classDefaultActionDynamicContentDelegate- Returns:
- String
-
getIcon
Changes the value of the attribute: Icon. This will change the default icon value and change the NmAction instance with the new value return from this method.
Supported API: true- Specified by:
getIconin interfaceActionDynamicContentDelegate- Overrides:
getIconin classDefaultActionDynamicContentDelegate- Returns:
- String
-