Class ActionComponentUtils
- java.lang.Object
-
- com.hybris.backoffice.actionbar.impl.ActionComponentUtils
-
- Direct Known Subclasses:
NavigationUtils
public class ActionComponentUtils extends java.lang.ObjectUtilities methods to help rendering actions representations
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedActionComponentUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidformatNodeElement(ActionComponent nodeElement, ActionbarContext context, ActionDefinition definition)Initialises component representation of action - sets its labels, images, etc.static <D extends ActionDefinition>
DgetDefinition(org.zkoss.zk.ui.HtmlBasedComponent nodeComponent)Gets a definition bound to provided component representationstatic java.lang.StringgetLabel(ActionbarContext context, java.lang.String locKey, java.lang.String fallback)Returns label for provided localized keystatic voidinitComponent(ActionComponent nodeElement, ActionbarContext context, ActionDefinition definition)Initialises component representation of action - stores all needed meta data, sets test ids, etc.
-
-
-
Method Detail
-
getLabel
public static java.lang.String getLabel(ActionbarContext context, java.lang.String locKey, java.lang.String fallback)
Returns label for provided localized key- Parameters:
context- bar contextlocKey- key to be foundfallback- fallback label to be returned if no label for key found- Returns:
- label
-
formatNodeElement
public static void formatNodeElement(ActionComponent nodeElement, ActionbarContext context, ActionDefinition definition)
Initialises component representation of action - sets its labels, images, etc.- Parameters:
nodeElement- component representationcontext- bar contextdefinition- action definition
-
initComponent
public static void initComponent(ActionComponent nodeElement, ActionbarContext context, ActionDefinition definition)
Initialises component representation of action - stores all needed meta data, sets test ids, etc.- Parameters:
nodeElement- component representationcontext- bar contextdefinition- action definition
-
getDefinition
public static <D extends ActionDefinition> D getDefinition(org.zkoss.zk.ui.HtmlBasedComponent nodeComponent)
Gets a definition bound to provided component representation- Type Parameters:
D- type of definition expected- Parameters:
nodeComponent- component representation- Returns:
- definition bound to component or
nullif a component does not represent any action
-
-