Class DetailPane

java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.Div
org.adempiere.webui.component.Panel
org.adempiere.webui.adwindow.DetailPane
All Implemented Interfaces:
Serializable, Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.IdSpace, org.zkoss.zk.ui.sys.ComponentCtrl

public class DetailPane extends Panel implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.zkoss.zk.ui.IdSpace
Detail panel that display the child tabs of a parent ADTabpanel tab.
Implemented as a panel with Tabbox.
Author:
hengsin
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Custom Tabpanel implementation for DetailPane.

    Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent

    org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl

    Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent

    org.zkoss.zk.ui.AbstractComponent.Children, org.zkoss.zk.ui.AbstractComponent.ForwardInfo, org.zkoss.zk.ui.AbstractComponent.TargetInfo
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
    On activate event for detail tab.
    Use to activate detail tab or notify detail tab after header tab change.
    static final String
    on delete event for selected tab
    static final String
    event to edit current row of selected tab
    static final String
    on new event for selected tab
    static final String
    on quick form event for selected tab
    static final String
    Record navigation event for selected tab.
    Event data is the navigation action (previous, next, first and last).
    static final String
    on save event for selected tab

    Fields inherited from class org.adempiere.webui.component.Panel

    HORIZONTAL, VERTICAL

    Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent

    _zclass

    Fields inherited from interface org.zkoss.zk.ui.Component

    APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE

    Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl

    AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
  • Constructor Summary

    Constructors
    Constructor
    Description
    default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add IADTabpanel to tabbox
    void
    addADTabpanel(IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel, boolean enabled)
    Add IADTabpanel to tabbox
    protected void
    Create popup content for message popup window
    void
    Disable all toolbar buttons
    void
    Fire ON_ACTIVATE_DETAIL_EVENT for selected tab.
    getADTabpanel(int index)
    Get IADTabpanel at index
    Get IADTabpanel for selected tab
    int
    Get selected tab index
    Get tab panel of selected tab
    int
    Get number of tabs
    boolean
    isTabEnabled(int tabIndex)
    Is tab at tabIndex enable
    boolean
    isTabVisible(int tabIndex)
    Is tab at tabIndex visible
    protected void
    onCustomize(org.zkoss.zk.ui.event.Event e)
    Open customize grid view dialog.
    void
    onEdit(boolean formView)
    Edit current record of selected tab.
    This event will make the selected tab becomes the new header tab, i.e become the selected tab of CompositeADTabbox.
    void
    onEvent(org.zkoss.zk.ui.event.Event event)
     
    void
    Add new row
    void
    onPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)
     
    void
    onPageDetached(org.zkoss.zk.ui.Page page)
     
    protected void
    onProcess(org.zkoss.zk.ui.Component button)
    Open process list popup
    protected void
    onToggle(org.zkoss.zk.ui.event.Event e)
    Toggle between grid and form view
    void
    Redraw tabbox
    void
    Remove all tabs and tabpanels
    void
    setADTabpanel(int index, IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel)
    Replace or add IADTabpanel to tabbox.
    void
    setADTabpanel(int index, IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel, boolean enabled)
    Replace or add IADTabpanel to tabbox.
    void
    setEventListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
    Set event listener for DetailPane events
    void
    setSelectedIndex(int curTabIndex)
    Set selected tab index
    void
    setStatusMessage(String status, boolean error)
    Set status and error text for selected tab.
    void
    setTabEnabled(int tabIndex, boolean enabled)
    Enable/disable tab at tabIndex
    void
    setTabVisibility(int tabIndex, boolean visible)
    Set visibility of tab at tabIndex
    void
     
    void
    Undo last tab selection
    void
    updateToolbar(boolean changed, boolean readOnly)
    Update toolbar button state

    Methods inherited from class org.zkoss.zul.impl.XulElement

    clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, renderProperties, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes

    Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent

    addSclass, evalCSSFlex, focus, getAction, getClientAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, removeSclass, removeSclass, service, setAction, setClass, setClientAction, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly

    Methods inherited from class org.zkoss.zk.ui.AbstractComponent

    addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, 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, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isChildable, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, 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

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.zkoss.zk.ui.IdSpace

    getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, hasFellow, hasFellow

    Methods inherited from interface org.zkoss.zk.ui.ext.Scope

    addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
  • Field Details

  • Constructor Details

    • DetailPane

      public DetailPane()
      default constructor
  • Method Details

    • getSelectedIndex

      public int getSelectedIndex()
      Get selected tab index
      Returns:
      selected tab index
    • setSelectedIndex

      public void setSelectedIndex(int curTabIndex)
      Set selected tab index
      Parameters:
      curTabIndex -
    • getTabcount

      public int getTabcount()
      Get number of tabs
      Returns:
      number of tabs
    • undoLastTabSelection

      public void undoLastTabSelection()
      Undo last tab selection
    • refresh

      public void refresh()
      Redraw tabbox
    • setADTabpanel

      public void setADTabpanel(int index, IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel)
      Replace or add IADTabpanel to tabbox.
      Parameters:
      index -
      tabPanel -
      tabLabel -
    • setADTabpanel

      public void setADTabpanel(int index, IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel, boolean enabled)
      Replace or add IADTabpanel to tabbox.
      Parameters:
      index -
      tabPanel -
      tabLabel -
      enabled -
    • addADTabpanel

      public void addADTabpanel(IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel)
      Add IADTabpanel to tabbox
      Parameters:
      tabPanel -
      tabLabel -
    • addADTabpanel

      public void addADTabpanel(IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel, boolean enabled)
      Add IADTabpanel to tabbox
      Parameters:
      tabPanel -
      tabLabel -
      enabled -
    • onToggle

      protected void onToggle(org.zkoss.zk.ui.event.Event e)
      Toggle between grid and form view
      Parameters:
      e -
    • onCustomize

      protected void onCustomize(org.zkoss.zk.ui.event.Event e)
      Open customize grid view dialog.
      Parameters:
      e -
    • onProcess

      protected void onProcess(org.zkoss.zk.ui.Component button)
      Open process list popup
      Parameters:
      button -
    • setEventListener

      public void setEventListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
      Set event listener for DetailPane events
      Parameters:
      listener -
    • reset

      public void reset()
      Remove all tabs and tabpanels
    • getADTabpanel

      public IADTabpanel getADTabpanel(int index)
      Get IADTabpanel at index
      Parameters:
      index -
      Returns:
      IADTabpanel at index
    • getSelectedADTabpanel

      public IADTabpanel getSelectedADTabpanel()
      Get IADTabpanel for selected tab
      Returns:
      selected IADTabpanel
    • getSelectedPanel

      public DetailPane.Tabpanel getSelectedPanel()
      Get tab panel of selected tab
      Returns:
      selected DetailPane.Tabpanel
    • setStatusMessage

      public void setStatusMessage(String status, boolean error)
      Set status and error text for selected tab.
      Parameters:
      status -
      error -
    • onEvent

      public void onEvent(org.zkoss.zk.ui.event.Event event) throws Exception
      Specified by:
      onEvent in interface org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
      Throws:
      Exception
    • createPopupContent

      protected void createPopupContent(String status)
      Create popup content for message popup window
      Parameters:
      status -
    • onPageDetached

      public void onPageDetached(org.zkoss.zk.ui.Page page)
      Specified by:
      onPageDetached in interface org.zkoss.zk.ui.sys.ComponentCtrl
      Overrides:
      onPageDetached in class org.zkoss.zk.ui.AbstractComponent
    • onPageAttached

      public void onPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)
      Specified by:
      onPageAttached in interface org.zkoss.zk.ui.sys.ComponentCtrl
      Overrides:
      onPageAttached in class org.zkoss.zk.ui.AbstractComponent
    • setVflex

      public void setVflex(String flex)
      Overrides:
      setVflex in class org.zkoss.zk.ui.HtmlBasedComponent
    • updateToolbar

      public void updateToolbar(boolean changed, boolean readOnly)
      Update toolbar button state
      Parameters:
      changed -
      readOnly -
    • onEdit

      public void onEdit(boolean formView) throws Exception
      Edit current record of selected tab.
      This event will make the selected tab becomes the new header tab, i.e become the selected tab of CompositeADTabbox.
      Parameters:
      formView - true to force form view.
      Throws:
      Exception
    • fireActivateDetailEvent

      public void fireActivateDetailEvent()
      Fire ON_ACTIVATE_DETAIL_EVENT for selected tab.
    • setTabVisibility

      public void setTabVisibility(int tabIndex, boolean visible)
      Set visibility of tab at tabIndex
      Parameters:
      tabIndex -
      visible -
    • isTabVisible

      public boolean isTabVisible(int tabIndex)
      Is tab at tabIndex visible
      Parameters:
      tabIndex -
      Returns:
      true if tab at tabIndex is visible
    • isTabEnabled

      public boolean isTabEnabled(int tabIndex)
      Is tab at tabIndex enable
      Parameters:
      tabIndex -
      Returns:
      true if tab at tabIndex is enable
    • setTabEnabled

      public void setTabEnabled(int tabIndex, boolean enabled)
      Enable/disable tab at tabIndex
      Parameters:
      tabIndex -
      enabled -
    • disableToolbar

      public void disableToolbar()
      Disable all toolbar buttons
    • onNew

      public void onNew() throws Exception
      Add new row
      Throws:
      Exception