Class DefaultListEditorRenderer<E>
- java.lang.Object
-
- com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer<T>
-
- com.hybris.cockpitng.editors.impl.AbstractPaginableEditorRenderer<java.util.List<E>>
-
- com.hybris.cockpitng.editor.defaultlist.DefaultListEditorRenderer<E>
-
- All Implemented Interfaces:
CockpitEditorRenderer<java.util.List<E>>
public class DefaultListEditorRenderer<E> extends AbstractPaginableEditorRenderer<java.util.List<E>>
Default renderer for list editors.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.zkoss.zul.ListboxeditorView-
Fields inherited from class com.hybris.cockpitng.editors.impl.AbstractPaginableEditorRenderer
CLEAR_EDITOR_IMG, CONFIRM_DELETE_PARAM, ITEM_INDEX_TO_CUT, LAST_EDITED_INDEX, LAST_EDITED_VALUE, NULL, ON_EDIT_EVENT, ON_INIT_EVENT, ON_UPDATE_EVENT, TRUE, YE_LIST_CONTAINER, YE_LIST_CONTENT, YE_LIST_INLINE, YE_LIST_INLINE_CANCEL, YE_LIST_INLINE_EDITOR, YE_LIST_INLINE_SAVE, YE_LIST_LINE_EDITOR, YE_LIST_LISTBOX, YE_LIST_TITLEBAR, YE_LIST_TITLEBAR_LABEL, YE_LIST_TITLEBAR_SPAN, YE_LIST_TITLEBAR_VALUE, YE_LIST_TOOLBAR, YE_LIST_TOOLBAR_ADDPOPUP, YE_LIST_TOOLBAR_ADDPOPUP_CHECKBOX, YE_LIST_TOOLBAR_BUTTON_EDIT, YE_LIST_Y_BTB_PRIMARY
-
Fields inherited from class com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer
HEADER_LABEL_TOOLTIP, ON_ADD_EVENT, ON_DELETE_EVENT, YW_EDITOR_AREA_LABEL_CONTAINER
-
Fields inherited from interface com.hybris.cockpitng.editors.CockpitEditorRenderer
INITIAL_EDIT_STRING
-
-
Constructor Summary
Constructors Constructor Description DefaultListEditorRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyRequiredSClasses(java.lang.String listType, Editor addPopupEditor)protected org.zkoss.zul.PopupcreateAddPopup(org.zkoss.zul.Listbox listbox, EditorListener<java.util.List<E>> listener, EditorContext<java.util.List<E>> context)Create popup for adding new list item after selected item.protected org.zkoss.zul.ButtoncreateEditButton(org.zkoss.zul.Listbox listbox, EditorContext<java.util.List<E>> context)Creates button for editing selected entry.protected EditorcreateEditorWithNestedContext(EditorContext<java.util.List<E>> context, java.lang.String listType)Creates editor for nested typewith nested eprotected org.zkoss.zul.ListcellcreateInlineEditor(EditorContext<java.util.List<E>> context, EditorListener<java.util.List<E>> listener, org.zkoss.zul.Listitem listItem, E data)Creates inline editor for list item.protected org.zkoss.zul.ListitemRenderer<E>createItemRenderer(EditorContext<java.util.List<E>> context, EditorListener<java.util.List<E>> listener)DefinesListitemRendererfor the items in the list.protected <T> EditorContext<T>createNestedContext(EditorContext<T> context)protected org.zkoss.zul.PopupcreateSimpleAddPopup(org.zkoss.zul.Listbox listbox, EditorListener<java.util.List<E>> listener, EditorContext<java.util.List<E>> context)Create popup for adding new list item.LabelServicegetLabelService()NotificationServicegetNotificationService()voidrender(org.zkoss.zk.ui.Component parent, EditorContext<java.util.List<E>> context, EditorListener<java.util.List<E>> listener)Creates a new editor component and attaches it to the specifiedComponentcomponent.-
Methods inherited from class com.hybris.cockpitng.editors.impl.AbstractPaginableEditorRenderer
configurePaging, createAddButton, createDeleteButton, createEditor, getPageSize, selectionNotEmpty
-
Methods inherited from class com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer
extractEmbeddedEditor, extractEmbeddedType, findAncestorEditor, findEmbeddedEditors, getInitialEditString, getL10nDecorator
-
-
-
-
Method Detail
-
render
public void render(org.zkoss.zk.ui.Component parent, EditorContext<java.util.List<E>> context, EditorListener<java.util.List<E>> listener)Description copied from interface:CockpitEditorRendererCreates a new editor component and attaches it to the specifiedComponentcomponent.- Parameters:
parent- parent component the editor should be attached tocontext- the context for the editor creationlistener- the listener to notify the rest of the world about value changes and other events
-
createItemRenderer
protected org.zkoss.zul.ListitemRenderer<E> createItemRenderer(EditorContext<java.util.List<E>> context, EditorListener<java.util.List<E>> listener)
DefinesListitemRendererfor the items in the list.- Parameters:
context-listener-- Returns:
ListitemRenderer
-
createInlineEditor
protected org.zkoss.zul.Listcell createInlineEditor(EditorContext<java.util.List<E>> context, EditorListener<java.util.List<E>> listener, org.zkoss.zul.Listitem listItem, E data)
Creates inline editor for list item.- Parameters:
context- - editor contextlistener- - editor listenerlistItem- - list item where the editor should be rendereddata- - initial data for the editor- Returns:
Listcellwith the inline editor
-
createEditorWithNestedContext
protected Editor createEditorWithNestedContext(EditorContext<java.util.List<E>> context, java.lang.String listType)
Creates editor for nested typewith nested e- Parameters:
context-listType-- Returns:
-
createSimpleAddPopup
protected org.zkoss.zul.Popup createSimpleAddPopup(org.zkoss.zul.Listbox listbox, EditorListener<java.util.List<E>> listener, EditorContext<java.util.List<E>> context)Create popup for adding new list item.- Parameters:
listbox-listener-context-- Returns:
Popup
-
createNestedContext
protected <T> EditorContext<T> createNestedContext(EditorContext<T> context)
-
createAddPopup
protected org.zkoss.zul.Popup createAddPopup(org.zkoss.zul.Listbox listbox, EditorListener<java.util.List<E>> listener, EditorContext<java.util.List<E>> context)Create popup for adding new list item after selected item.- Specified by:
createAddPopupin classAbstractPaginableEditorRenderer<java.util.List<E>>- Parameters:
listbox-listener-context-- Returns:
Popup
-
applyRequiredSClasses
protected void applyRequiredSClasses(java.lang.String listType, Editor addPopupEditor)
-
createEditButton
protected org.zkoss.zul.Button createEditButton(org.zkoss.zul.Listbox listbox, EditorContext<java.util.List<E>> context)Creates button for editing selected entry. The button handler callsEvents.postEvent(String, Component, Object).- Parameters:
context- to get some properties from
-
getLabelService
public LabelService getLabelService()
-
getNotificationService
public NotificationService getNotificationService()
-
-