Class AtpFormulaPanelRenderer
java.lang.Object
com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer<org.zkoss.zk.ui.Component,T,K>
com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaComponentRenderer<com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel,Object>
com.hybris.cockpitng.widgets.editorarea.renderer.impl.DefaultEditorAreaPanelRenderer
de.hybris.platform.warehousingbackoffice.renderers.AtpFormulaPanelRenderer
- All Implemented Interfaces:
com.hybris.cockpitng.widgets.common.NotifyingWidgetComponentRenderer<org.zkoss.zk.ui.Component,,com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel, Object> com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zk.ui.Component,com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel, Object>
public class AtpFormulaPanelRenderer
extends com.hybris.cockpitng.widgets.editorarea.renderer.impl.DefaultEditorAreaPanelRenderer
This panel renderer allows displaying AtpFormula variables
In order to guarantee proper rendering, you cannot reuse the same instance of this renderer across multiple
widgets.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaComponentRenderer
ATTR_NOT_SAVED_OBJECT, attributeDescriptionIconRenderer, CURRENT_OBJECT, CURRENT_OBJECT_DOTLESS, DEFAULT_ENCRYPTED_EDITOR, MISSING_RENDERER_ERROR_MSG, SCLASS_CELL_READ_RESTRICTED, SCLASS_CUSTOM_CONTAINER, SCLASS_DESCRIPTION, SCLASS_DESCRIPTION_LABEL, SCLASS_EDITOR, SCLASS_EDITOR_CONTAINER, SCLASS_LABEL, SCLASS_READONLY_EDITOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Set<PropertyDescriptor>getAllAtpFormulaVariables(AtpFormulaModel atpFormula) Provides the Set of atpformula's propertiesprotected com.hybris.cockpitng.dataaccess.facades.type.TypeFacadeprotected voidhandleOnCheckEvent(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, PropertyDescriptor formulaVarPropertyDescriptor, org.zkoss.zul.Checkbox checkbox) Updates the current formula variable to the ATP formula.voidrender(org.zkoss.zk.ui.Component component, com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel abstractPanelConfiguration, Object object, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Renders the ATP Formula variables.protected voidrenderAtpFormulaBuilderHeader(org.zkoss.zul.Vlayout vlayout) Renders the Atp Formula Builder Header.protected voidrenderAtpFormulaVariableRow(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, org.zkoss.zul.Vlayout vlayout, PropertyDescriptor formulaVarPropertyDescriptor) Renders the given Atp formula variableprotected voidrenderAtpFormulaVariables(org.zkoss.zk.ui.HtmlBasedComponent attributeContainer, AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Renders the properties ofAtpFormulaModelalong with +/- option to either add or subtract the corresponding property in theAtpFormulaModel.protected voidrenderIndividualFormulaVariables(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, org.zkoss.zul.Vlayout vlayout) Renders each individual formula variable with the +/- and remove options.protected voidsetAfterCancelListener(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Adds afterCancelListener, so as to reinitialize with original values when the Refresh button is pressed in the editor areavoidsetAtpFormulaVar2ArithmeticOperatorMap(Map<String, String> atpFormulaVar2ArithmeticOperatorMap) voidsetTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade) Methods inherited from class com.hybris.cockpitng.widgets.editorarea.renderer.impl.DefaultEditorAreaPanelRenderer
createAttributeRenderer, createCustomHtmlRendererMethods inherited from class com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaComponentRenderer
buildEditor, canChangeProperty, createCustom, createEditor, createNotReadableAttributeLabelRenderer, evaluateCustomDefinition, extractParameterName, extractParameterValue, extractPropertiesList, getAttributeDescription, getCockpitLocaleService, getCockpitUserService, getEditAvailabilityProviderFactory, getEditorBuilder, getLabelService, getObjectFacade, getPermissionFacade, getPropertyValueService, getWidgetRenderingUtils, processEditorBeforeComposition, renderNotReadableLabel, resolveAttributeLabel, resolveAttributePath, resolveCustomComponentRenderer, resolveEditorType, resolveLabel, setAttributeDescriptionIconRenderer, setCockpitLocaleService, setCockpitUserService, setEditAvailabilityProviderFactory, setLabelService, setObjectFacade, setPasswordEditorAsDefaultForEncryptedStrings, setPermissionFacade, setPropertyValueService, setWidgetRenderingUtils, validateCustomElementMethods inherited from class com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer
addRendererListener, fireComponentRendered, fireComponentRendered, fireComponentRendered, removeRendererListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hybris.cockpitng.widgets.common.WidgetComponentRenderer
render
-
Field Details
-
ADD_VARIABLE_IN_ATPFORMULA
- See Also:
-
SUB_VARIABLE_IN_ATPFORMULA
- See Also:
-
ATPFORMULA_BUILDER_HEADER_ACTIONS
- See Also:
-
ATPFORMULA_BUILDER_HEADER_VARIABLES
- See Also:
-
ATPFORMULA_TABLE_CLASS
- See Also:
-
AVAILABILITY
- See Also:
-
PLUS_OPERATOR
- See Also:
-
MINUS_OPERATOR
- See Also:
-
-
Constructor Details
-
AtpFormulaPanelRenderer
public AtpFormulaPanelRenderer()
-
-
Method Details
-
render
public void render(org.zkoss.zk.ui.Component component, com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel abstractPanelConfiguration, Object object, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Renders the ATP Formula variables.- Specified by:
renderin interfacecom.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zk.ui.Component,com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel, Object> - Overrides:
renderin classcom.hybris.cockpitng.widgets.editorarea.renderer.impl.DefaultEditorAreaPanelRenderer- Parameters:
component-abstractPanelConfiguration-object-dataType-widgetInstanceManager-
-
renderAtpFormulaVariables
protected void renderAtpFormulaVariables(org.zkoss.zk.ui.HtmlBasedComponent attributeContainer, AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Renders the properties ofAtpFormulaModelalong with +/- option to either add or subtract the corresponding property in theAtpFormulaModel.- Parameters:
attributeContainer-atpFormula-widgetInstanceManager-
-
renderIndividualFormulaVariables
protected void renderIndividualFormulaVariables(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, org.zkoss.zul.Vlayout vlayout) Renders each individual formula variable with the +/- and remove options.- Parameters:
atpFormula-widgetInstanceManager-vlayout-
-
renderAtpFormulaVariableRow
protected void renderAtpFormulaVariableRow(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, org.zkoss.zul.Vlayout vlayout, PropertyDescriptor formulaVarPropertyDescriptor) Renders the given Atp formula variable- Parameters:
atpFormula- theAtpFormulaModelto be renderedwidgetInstanceManager- theWidgetInstanceManagervlayout- theVlayoutto contain the rendered atpformula variableformulaVarPropertyDescriptor- thePropertyDescriptorfor the AtpFormula variable being rendered
-
handleOnCheckEvent
protected void handleOnCheckEvent(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, PropertyDescriptor formulaVarPropertyDescriptor, org.zkoss.zul.Checkbox checkbox) Updates the current formula variable to the ATP formula.- Parameters:
atpFormula-widgetInstanceManager-formulaVarPropertyDescriptor-
-
renderAtpFormulaBuilderHeader
protected void renderAtpFormulaBuilderHeader(org.zkoss.zul.Vlayout vlayout) Renders the Atp Formula Builder Header.- Parameters:
vlayout-
-
setAfterCancelListener
protected void setAfterCancelListener(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Adds afterCancelListener, so as to reinitialize with original values when the Refresh button is pressed in the editor area- Parameters:
widgetInstanceManager-
-
getAllAtpFormulaVariables
Provides the Set of atpformula's properties- Returns:
- all atpFormulaVariables
-
getTypeFacade
protected com.hybris.cockpitng.dataaccess.facades.type.TypeFacade getTypeFacade() -
setTypeFacade
public void setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade) -
getAtpFormulaVar2ArithmeticOperatorMap
-
setAtpFormulaVar2ArithmeticOperatorMap
-