Class ADTabpanel

    • Nested Class Summary

      • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      ADTabpanel()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activate​(boolean activate)
      Activate/deactivate panel
      void activateDetailIfVisible()
      activate current selected detail tab if it is visible
      void afterSave​(boolean onSaveEvent)
      After save event
      void createUI()
      Create UI components if not already created
      protected void createUI​(boolean update)  
      boolean dataSave​(boolean onSaveEvent)  
      void dataStatusChanged​(DataStatusEvent e)
      Data Changed
      void dynamicDisplay​(int col)
      Validate display properties of fields of current row.
      void editorTraverse​(Callback<WEditor> editorTaverseCallback)
      helper method to loop thru editor collection of panel
      can use on callout to check relative editor
      void focus()  
      protected void focusToEditor​(WEditor toFocus, boolean checkCurrent)  
      void focusToFirstEditor()
      set focus to first active editor
      void focusToFirstEditor​(boolean checkCurrent)  
      void focusToNextEditor​(WEditor ref)
      set focus to next readwrite editor from ref
      String get_ValueAsString​(String variableName)
      Get Variable Value
      DetailPane getDetailPane()  
      String getDisplayLogic()  
      GridTab getGridTab()  
      GridView getGridView()  
      int getRecord_ID()  
      String getTableName()  
      int getTabLevel()  
      int getTabNo()  
      String getTitle()  
      List<org.zkoss.zul.Button> getToolbarButtons()
      Get all visible button editors
      String getTreeDisplayedOn()  
      ADTreePanel getTreePanel()  
      int getWindowNo()  
      boolean hasDetailTabs()  
      void init​(AbstractADWindowContent winPanel, GridTab gridTab)  
      boolean isActivated()  
      boolean isCurrent()
      Is panel need refresh
      boolean isDetailPaneMode()  
      boolean isDetailVisible()
      Get is detail pane visible
      boolean isEnableCustomizeButton()  
      boolean isEnableQuickFormButton()  
      boolean isGridView()  
      protected boolean isMobile()  
      boolean needSave​(boolean rowChange, boolean onlyRealChange)  
      protected void onClientInfo()  
      boolean onEnterKey()
      Enter key event
      void onEvent​(org.zkoss.zk.ui.event.Event event)  
      void onPageDetached​(org.zkoss.zk.ui.Page page)  
      void query()
      Retrieve from db
      void query​(boolean onlyCurrentRows, int onlyCurrentDays, int maxRows)
      Retrieve from db
      void refresh()
      Refresh current row
      void resetDetailForNewParentRecord()
      reset detail data grid for new parent record that's not saved yet
      void setDetailPane​(DetailPane component)  
      void setDetailPaneMode​(boolean detailPaneMode)  
      void setFocusToField​(String columnName)  
      void setParent​(org.zkoss.zk.ui.Component parent)  
      void setSelectedNode()
      set selected tree node for current row (if there's tree)
      void setTabNo​(int tabNo)  
      void switchRowPresentation()
      Toggle between form and grid view
      void updateDetailToolbar​(org.zkoss.zul.Toolbar toolbar)
      Enabled/Disabled detail panel toolbar button
      void updateToolbar​(ADWindowToolbar toolbar)
      Enabled/Disabled tab toolbar button
      • Methods inherited from class org.zkoss.zul.Div

        getAlign, renderProperties, setAlign
      • 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

        addSclass, evalCSSFlex, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, removeSclass, removeSclass, 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, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, 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, invalidatePartial, isChildable, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, 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 interface org.zkoss.zk.ui.Component

        addEventListener, addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, detach, 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.sys.ComponentCtrl

        invalidatePartial
      • 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
    • Constructor Detail

      • ADTabpanel

        public ADTabpanel()
    • Method Detail

      • createUI

        public void createUI()
        Create UI components if not already created
        Specified by:
        createUI in interface IADTabpanel
      • createUI

        protected void createUI​(boolean update)
      • dynamicDisplay

        public void dynamicDisplay​(int col)
        Validate display properties of fields of current row.
        Specified by:
        dynamicDisplay in interface IADTabpanel
        Parameters:
        col -
      • get_ValueAsString

        public String get_ValueAsString​(String variableName)
        Description copied from interface: Evaluatee
        Get Variable Value
        Specified by:
        get_ValueAsString in interface Evaluatee
        Parameters:
        variableName -
        Returns:
        value
      • getTabLevel

        public int getTabLevel()
        Specified by:
        getTabLevel in interface IADTabpanel
        Returns:
        The tab level of this Tabpanel
      • getRecord_ID

        public int getRecord_ID()
        Specified by:
        getRecord_ID in interface IADTabpanel
        Returns:
        The record ID of this Tabpanel
      • isCurrent

        public boolean isCurrent()
        Is panel need refresh
        Specified by:
        isCurrent in interface IADTabpanel
        Returns:
        boolean
      • getWindowNo

        public int getWindowNo()
        Returns:
        windowNo
      • query

        public void query()
        Retrieve from db
        Specified by:
        query in interface IADTabpanel
      • query

        public void query​(boolean onlyCurrentRows,
                          int onlyCurrentDays,
                          int maxRows)
        Retrieve from db
        Specified by:
        query in interface IADTabpanel
        Parameters:
        onlyCurrentRows -
        onlyCurrentDays -
        maxRows -
      • resetDetailForNewParentRecord

        public void resetDetailForNewParentRecord()
        reset detail data grid for new parent record that's not saved yet
        Specified by:
        resetDetailForNewParentRecord in interface IADTabpanel
      • getTreeDisplayedOn

        public String getTreeDisplayedOn()
        Returns:
        TreePanel
      • refresh

        public void refresh()
        Refresh current row
        Specified by:
        refresh in interface IADTabpanel
      • activate

        public void activate​(boolean activate)
        Activate/deactivate panel
        Specified by:
        activate in interface IADTabpanel
        Parameters:
        activate -
      • focusToFirstEditor

        public void focusToFirstEditor​(boolean checkCurrent)
        Parameters:
        checkCurrent -
      • onEvent

        public void onEvent​(org.zkoss.zk.ui.event.Event event)
        Specified by:
        onEvent in interface org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
        Parameters:
        event -
        See Also:
        EventListener.onEvent(Event)
      • setSelectedNode

        public void setSelectedNode()
        set selected tree node for current row (if there's tree)
      • focus

        public void focus()
        Overrides:
        focus in class org.zkoss.zk.ui.HtmlBasedComponent
      • setFocusToField

        public void setFocusToField​(String columnName)
        Parameters:
        columnName -
      • isGridView

        public boolean isGridView()
        Specified by:
        isGridView in interface IADTabpanel
        Returns:
        boolean
      • isActivated

        public boolean isActivated()
        Specified by:
        isActivated in interface IADTabpanel
        Returns:
        true if the panel have been activated
      • getToolbarButtons

        public List<org.zkoss.zul.Button> getToolbarButtons()
        Get all visible button editors
        Specified by:
        getToolbarButtons in interface IADTabpanel
        Returns:
        List
      • needSave

        public boolean needSave​(boolean rowChange,
                                boolean onlyRealChange)
        Specified by:
        needSave in interface IADTabpanel
        Returns:
        true if there are pending changes
      • dataSave

        public boolean dataSave​(boolean onSaveEvent)
        Specified by:
        dataSave in interface IADTabpanel
        Returns:
        true if the save operation completed successfully
      • isDetailPaneMode

        public boolean isDetailPaneMode()
        Specified by:
        isDetailPaneMode in interface IADTabpanel
        Returns:
        true if the panel is in detailpane node
      • setTabNo

        public void setTabNo​(int tabNo)
        Specified by:
        setTabNo in interface IADTabpanel
      • getTabNo

        public int getTabNo()
        Specified by:
        getTabNo in interface IADTabpanel
        Returns:
        tab no ( ad_tab.tabno )
      • activateDetailIfVisible

        public void activateDetailIfVisible()
        activate current selected detail tab if it is visible
      • isDetailVisible

        public boolean isDetailVisible()
        Description copied from interface: IADTabpanel
        Get is detail pane visible
        Specified by:
        isDetailVisible in interface IADTabpanel
        Returns:
        true if the detailpane is visible
      • hasDetailTabs

        public boolean hasDetailTabs()
        Returns:
        true if have one or more detail tabs
      • focusToEditor

        protected void focusToEditor​(WEditor toFocus,
                                     boolean checkCurrent)
      • setParent

        public void setParent​(org.zkoss.zk.ui.Component parent)
        Specified by:
        setParent in interface org.zkoss.zk.ui.Component
        Overrides:
        setParent in class org.zkoss.zk.ui.AbstractComponent
      • 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
      • onClientInfo

        protected void onClientInfo()
      • isMobile

        protected boolean isMobile()
      • isEnableQuickFormButton

        public boolean isEnableQuickFormButton()
        Specified by:
        isEnableQuickFormButton in interface IADTabpanel
        Returns:
        Quick Form Button Enabled/Disabled
      • isEnableCustomizeButton

        public boolean isEnableCustomizeButton()
        Specified by:
        isEnableCustomizeButton in interface IADTabpanel
        Returns:
        customization enabled/disabled for tab
      • updateDetailToolbar

        public void updateDetailToolbar​(org.zkoss.zul.Toolbar toolbar)
        Description copied from interface: IADTabpanel
        Enabled/Disabled detail panel toolbar button
        Specified by:
        updateDetailToolbar in interface IADTabpanel
        Parameters:
        toolbar - - Toolbar