Class DefaultListEditorRenderer<E>

    • Field Detail

      • editorView

        protected org.zkoss.zul.Listbox editorView
    • Constructor Detail

      • DefaultListEditorRenderer

        public DefaultListEditorRenderer()
    • 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: CockpitEditorRenderer
        Creates a new editor component and attaches it to the specified Component component.
        Parameters:
        parent - parent component the editor should be attached to
        context - the context for the editor creation
        listener - 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)
        Defines ListitemRenderer for 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 context
        listener - - editor listener
        listItem - - list item where the editor should be rendered
        data - - initial data for the editor
        Returns:
        Listcell with 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
      • 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:
        createAddPopup in class AbstractPaginableEditorRenderer<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 calls Events.postEvent(String, Component, Object).
        Parameters:
        context - to get some properties from