Class ContextAreaBrowserComponent
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.impl.XulElement
-
- org.zkoss.zul.Div
-
- de.hybris.platform.cockpit.components.contentbrowser.AbstractBrowserComponent
-
- de.hybris.platform.cockpit.components.contentbrowser.AbstractContextBrowserComponent
-
- de.hybris.platform.cockpit.components.contentbrowser.ContextAreaBrowserComponent
-
- All Implemented Interfaces:
BrowserComponent,CockpitComponent,DesktopRemovalAwareComponent,java.io.Serializable,java.lang.Cloneable,org.zkoss.zk.ui.api.HtmlBasedComponent,org.zkoss.zk.ui.Component,org.zkoss.zk.ui.ext.Scope,org.zkoss.zk.ui.sys.ComponentCtrl,org.zkoss.zul.api.Div,org.zkoss.zul.impl.api.XulElement
public class ContextAreaBrowserComponent extends AbstractContextBrowserComponent implements DesktopRemovalAwareComponent
Context area browser component.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classContextAreaBrowserComponent.MyListenerHandlerprotected classContextAreaBrowserComponent.MyModelWrapper
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringBROWSERAREA_SHOW_MAX_L10NKEYprotected booleancleanContextHeaderprotected ColumnModelListenercolumnModelListenerListener that keeps track of visibility changes of columns and persists those changes.protected static java.lang.StringCONTEXT_AREA_MAIN_DIV_SCLASSprotected org.zkoss.zk.ui.HtmlBasedComponentcontextAreaprotected org.zkoss.zul.DivcontextAreaMainDivprotected org.zkoss.zul.LabelcontextHeaderprotected DefaultListModel<TypedObject>contextModelprotected static java.lang.StringEMPTY_MESSAGE_I3protected org.zkoss.zk.ui.event.EventListenergridContextControllerprotected java.lang.StringheaderStringprotected booleaninlineCreationEnabledprotected java.lang.StringinternalContextViewModeprotected ObjectTemplatelastContextTypeprotected static java.lang.StringLIST_VIEW_CONFIG_CODEprotected UIListViewlistViewprotected LoginServiceloginServiceprotected org.zkoss.zul.DivmultiSelectActionAreaprotected org.zkoss.zul.ComboboxpageSizeComboprotected org.zkoss.zul.Pagingpagingprotected TypedObjectpreviouslyActiveItemprotected SystemServicesystemServiceprotected ContextAreaTableControllertableControllerprotected org.zkoss.zul.DivtoolbarDivprotected TypeServicetypeServiceprotected UIAccessRightServiceuiAccessRightServiceprotected UIConfigurationServiceuiConfigurationService-
Fields inherited from class de.hybris.platform.cockpit.components.contentbrowser.AbstractBrowserComponent
ADV_QUERY_BTN_ACTIVE_IMG, ADV_QUERY_BTN_IMG, BROWSER_TOOLBAR_SCLASS, CLOSE_BTN_IMG, CONTENT_BROWSER_GB_SCLASS, CONTENT_BROWSER_STICKY_GB_SCLASS, DUPLICATE_BTN_IMG, initialized, MAIN_AREA_BL_SCLASS, MINIMIZE_BTN_IMG, SAVE_QUERY_BTN_IMG, SEARCH_MAGNIFIER_BTN_IMG, SPLIT_ACTIVE_BTN_IMG, SPLIT_INACTIVE_BTN_IMG
-
-
Constructor Summary
Constructors Constructor Description ContextAreaBrowserComponent(BrowserModel model, AbstractContentBrowser contentBrowser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanup()protected org.zkoss.zul.ToolbarbuttoncreateCloseButton(java.lang.String closeBtnImg)protected org.zkoss.zk.ui.HtmlBasedComponentcreateContextArea()protected org.zkoss.zul.GroupboxcreateContextGroupbox()protected java.lang.StringcreateContextHeader()protected org.zkoss.zul.DivcreateContextMainDiv()protected TableModelListenercreateContextTableModelListener()protected ListViewConfigurationcreateMultiTypeListViewConfiguration()voiddesktopRemoved(org.zkoss.zk.ui.Desktop desktop)voiddetach()protected ColumnModelListenergetColumnModelListener()A columnModelListener to keep track of visibility changes of the ListModel columns.protected DefaultListModel<TypedObject>getContextListModel()protected ObjectTemplategetContextResultType()protected MutableTableModelgetContextTableModel()EditorFactorygetEditorFactory()protected java.util.Collection<org.zkoss.zk.ui.HtmlBasedComponent>getGroupboxComponents()protected java.util.Collection<org.zkoss.zk.ui.HtmlBasedComponent>getHeaderComponents()protected MutableListModelgetListComponentModel()protected ListViewHelper.ListenerHandlergetListenerHandler()protected ListViewConfigurationgetListViewConfiguration(ObjectTemplate objectTemplate, java.lang.String code)protected LoginServicegetLoginService()AdvancedBrowserModelgetModel()protected AbstractPageableBrowserModelgetPageableBrowserModelIfPresent()protected java.util.Set<PropertyDescriptor>getRequiredPropertyDescriptors(ObjectTemplate template)protected SystemServicegetSystemService()protected TypeServicegetTypeService()protected UIAccessRightServicegetUIAccessRightService()protected UIConfigurationServicegetUIConfigurationService()protected ObjectValueContainergetValueContainer(ObjectTemplate template)booleaninitialize()Initializes this browser component i.e.protected booleanisContextPagingEnabled(AbstractPageableBrowserModel browserModel)protected UIListViewloadListView()protected ListViewConfigurationloadListViewConfig()load the list view configurationvoidresize()Notifies this browser component that it should resize itself if possible, since the view state might require it.voidsetActiveItem(TypedObject activeItem)Sets the active item of this browser component toactiveItem.protected voidsetContextTableModel(MutableTableModel tableModel)voidsetParent(org.zkoss.zk.ui.Component parent)protected voidshowAddItemPopup()protected voidshowAddItemRow()protected voidstoreListViewConfiguration()booleanupdate()Updates this browser component i.e.booleanupdate(boolean cleanContextHeader)Updates this browser component i.e.voidupdateActiveItems()Re-renders the currently active item(s).protected voidupdateContextItems()voidupdateItem(TypedObject item, java.util.Set<PropertyDescriptor> modifiedProperties)Re-renders the item.protected voidupdateMultiSelectAction(ListViewAction.Context context, ListViewAction action)protected voidupdateMultiSelectActionArea()protected voidupdatePaging()voidupdateSelectedItems()Re-renders the currently selected item(s).-
Methods inherited from class de.hybris.platform.cockpit.components.contentbrowser.AbstractBrowserComponent
getContentBrowser, setModel, updateItem
-
Methods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
-
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientAttribute, getClientDataAttribute, getDefinition, getDesktop, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getShadowVariable, getShadowVariable, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, query, queryAll, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setId, setMold, setPage, setPageBefore, setStubonly, setStubonly, setTemplate, setVisible, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride
-
Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex
-
-
-
-
Field Detail
-
CONTEXT_AREA_MAIN_DIV_SCLASS
protected static final java.lang.String CONTEXT_AREA_MAIN_DIV_SCLASS
- See Also:
- Constant Field Values
-
EMPTY_MESSAGE_I3
protected static final java.lang.String EMPTY_MESSAGE_I3
- See Also:
- Constant Field Values
-
LIST_VIEW_CONFIG_CODE
protected static final java.lang.String LIST_VIEW_CONFIG_CODE
- See Also:
- Constant Field Values
-
BROWSERAREA_SHOW_MAX_L10NKEY
protected static final java.lang.String BROWSERAREA_SHOW_MAX_L10NKEY
- See Also:
- Constant Field Values
-
listView
protected transient UIListView listView
-
contextArea
protected transient org.zkoss.zk.ui.HtmlBasedComponent contextArea
-
internalContextViewMode
protected java.lang.String internalContextViewMode
-
contextModel
protected final DefaultListModel<TypedObject> contextModel
-
gridContextController
protected org.zkoss.zk.ui.event.EventListener gridContextController
-
contextAreaMainDiv
protected transient org.zkoss.zul.Div contextAreaMainDiv
-
uiConfigurationService
protected UIConfigurationService uiConfigurationService
-
typeService
protected TypeService typeService
-
uiAccessRightService
protected UIAccessRightService uiAccessRightService
-
tableController
protected ContextAreaTableController tableController
-
lastContextType
protected ObjectTemplate lastContextType
-
loginService
protected LoginService loginService
-
contextHeader
protected org.zkoss.zul.Label contextHeader
-
cleanContextHeader
protected boolean cleanContextHeader
-
systemService
protected SystemService systemService
-
inlineCreationEnabled
protected boolean inlineCreationEnabled
-
toolbarDiv
protected org.zkoss.zul.Div toolbarDiv
-
multiSelectActionArea
protected org.zkoss.zul.Div multiSelectActionArea
-
paging
protected org.zkoss.zul.Paging paging
-
pageSizeCombo
protected org.zkoss.zul.Combobox pageSizeCombo
-
previouslyActiveItem
protected TypedObject previouslyActiveItem
-
headerString
protected java.lang.String headerString
-
columnModelListener
protected ColumnModelListener columnModelListener
Listener that keeps track of visibility changes of columns and persists those changes.
-
-
Constructor Detail
-
ContextAreaBrowserComponent
public ContextAreaBrowserComponent(BrowserModel model, AbstractContentBrowser contentBrowser)
-
-
Method Detail
-
initialize
public boolean initialize()
Description copied from class:AbstractBrowserComponentInitializes this browser component i.e. creates all required components, adds event listeners etc. Implementation note: Remember to set theinitializedflag totrueafter this method has been called. Note: This method is automatically called when a model or browser controller is set.- Specified by:
initializein interfaceCockpitComponent- Specified by:
initializein classAbstractBrowserComponent- Returns:
trueif initialization was successful,falseotherwise- See Also:
AbstractBrowserComponent.setModel(BrowserModel)
-
getModel
public AdvancedBrowserModel getModel()
- Specified by:
getModelin interfaceBrowserComponent- Overrides:
getModelin classAbstractBrowserComponent
-
update
public boolean update()
Description copied from class:AbstractBrowserComponentUpdates this browser component i.e. synchronizes its view width the underlying model.- Specified by:
updatein interfaceCockpitComponent- Specified by:
updatein classAbstractBrowserComponent- Returns:
trueif this browser was successfully updated,falseotherwise
-
updateMultiSelectActionArea
protected void updateMultiSelectActionArea()
-
updateMultiSelectAction
protected void updateMultiSelectAction(ListViewAction.Context context, ListViewAction action)
-
updatePaging
protected void updatePaging()
-
setActiveItem
public void setActiveItem(TypedObject activeItem)
Description copied from class:AbstractBrowserComponentSets the active item of this browser component toactiveItem.- Specified by:
setActiveItemin interfaceCockpitComponent- Specified by:
setActiveItemin classAbstractBrowserComponent- Parameters:
activeItem- the new active item
-
updateActiveItems
public void updateActiveItems()
Description copied from class:AbstractBrowserComponentRe-renders the currently active item(s).- Specified by:
updateActiveItemsin interfaceCockpitComponent- Specified by:
updateActiveItemsin classAbstractBrowserComponent
-
updateSelectedItems
public void updateSelectedItems()
Description copied from class:AbstractBrowserComponentRe-renders the currently selected item(s).- Specified by:
updateSelectedItemsin interfaceCockpitComponent- Specified by:
updateSelectedItemsin classAbstractBrowserComponent
-
updateItem
public void updateItem(TypedObject item, java.util.Set<PropertyDescriptor> modifiedProperties)
Description copied from class:AbstractBrowserComponentRe-renders the item.- Specified by:
updateItemin interfaceCockpitComponent- Specified by:
updateItemin classAbstractBrowserComponent- Parameters:
item- the item to be re-renderedmodifiedProperties- modified properties
-
getContextListModel
protected DefaultListModel<TypedObject> getContextListModel()
-
updateContextItems
protected void updateContextItems()
-
createContextArea
protected org.zkoss.zk.ui.HtmlBasedComponent createContextArea()
-
createContextMainDiv
protected org.zkoss.zul.Div createContextMainDiv()
-
createContextHeader
protected java.lang.String createContextHeader()
-
createContextGroupbox
protected org.zkoss.zul.Groupbox createContextGroupbox()
-
resize
public void resize()
Description copied from class:AbstractBrowserComponentNotifies this browser component that it should resize itself if possible, since the view state might require it. This is typically only necessary for ZK'sBorderlayoutcomponents.- Specified by:
resizein classAbstractBrowserComponent
-
getListComponentModel
protected MutableListModel getListComponentModel()
-
loadListView
protected UIListView loadListView()
-
loadListViewConfig
protected ListViewConfiguration loadListViewConfig()
load the list view configuration
-
createMultiTypeListViewConfiguration
protected ListViewConfiguration createMultiTypeListViewConfiguration()
-
getListViewConfiguration
protected ListViewConfiguration getListViewConfiguration(ObjectTemplate objectTemplate, java.lang.String code)
-
getUIConfigurationService
protected UIConfigurationService getUIConfigurationService()
-
getUIAccessRightService
protected UIAccessRightService getUIAccessRightService()
-
getLoginService
protected LoginService getLoginService()
-
getTypeService
protected TypeService getTypeService()
-
getContextTableModel
protected MutableTableModel getContextTableModel()
-
setContextTableModel
protected void setContextTableModel(MutableTableModel tableModel)
-
getContextResultType
protected ObjectTemplate getContextResultType()
-
detach
public void detach()
- Specified by:
detachin interfaceorg.zkoss.zk.ui.Component- Overrides:
detachin classorg.zkoss.zk.ui.AbstractComponent
-
setParent
public void setParent(org.zkoss.zk.ui.Component parent)
- Specified by:
setParentin interfaceorg.zkoss.zk.ui.Component- Overrides:
setParentin classorg.zkoss.zk.ui.AbstractComponent
-
desktopRemoved
public void desktopRemoved(org.zkoss.zk.ui.Desktop desktop)
- Specified by:
desktopRemovedin interfaceDesktopRemovalAwareComponent
-
cleanup
protected void cleanup()
-
getSystemService
protected SystemService getSystemService()
-
showAddItemPopup
protected void showAddItemPopup()
-
showAddItemRow
protected void showAddItemRow()
-
getValueContainer
protected ObjectValueContainer getValueContainer(ObjectTemplate template)
-
getRequiredPropertyDescriptors
protected java.util.Set<PropertyDescriptor> getRequiredPropertyDescriptors(ObjectTemplate template)
-
isContextPagingEnabled
protected boolean isContextPagingEnabled(AbstractPageableBrowserModel browserModel)
-
getPageableBrowserModelIfPresent
protected AbstractPageableBrowserModel getPageableBrowserModelIfPresent()
-
getEditorFactory
public EditorFactory getEditorFactory()
-
update
public boolean update(boolean cleanContextHeader)
Description copied from class:AbstractContextBrowserComponentUpdates this browser component i.e. synchronizes its view width the underlying model.- Specified by:
updatein classAbstractContextBrowserComponent- Parameters:
cleanContextHeader- indicates if cleaning of ContextHeader is necessary- Returns:
trueif this browser was successfully updated,falseotherwise
-
getListenerHandler
protected ListViewHelper.ListenerHandler getListenerHandler()
-
getGroupboxComponents
protected java.util.Collection<org.zkoss.zk.ui.HtmlBasedComponent> getGroupboxComponents()
-
getHeaderComponents
protected java.util.Collection<org.zkoss.zk.ui.HtmlBasedComponent> getHeaderComponents()
-
createCloseButton
protected org.zkoss.zul.Toolbarbutton createCloseButton(java.lang.String closeBtnImg)
-
createContextTableModelListener
protected TableModelListener createContextTableModelListener()
-
getColumnModelListener
protected ColumnModelListener getColumnModelListener()
A columnModelListener to keep track of visibility changes of the ListModel columns.- Returns:
- ColumnModelListener the listener that should be hooked into ColumnModel
-
storeListViewConfiguration
protected void storeListViewConfiguration()
-
-