Class ADSortTab

  • All Implemented Interfaces:
    Serializable, Cloneable, IADTabpanel, Evaluatee, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.sys.ComponentCtrl

    public class ADSortTab
    extends Panel
    implements IADTabpanel
    Tab to maintain Order/Sequence
    Version:
    $Id: VSortTab.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $
    Author:
    Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL FR [ 1779410 ] VSortTab: display ID for not visible columns, victor.perez@e-evolution.com, e-Evolution FR [ 2826406 ] The Tab Sort without parent column
  • https://sourceforge.net/p/adempiere/feature-requests/776/ Zk Port, Low Heng Sin, Juan David Arboleda : Refactoring Yes and No List to work with multiple choice.
  • See Also:
    Serialized Form
    • 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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static CLogger log
      Logger
      • 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, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
    • Constructor Summary

      Constructors 
      Constructor Description
      ADSortTab()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activate​(boolean b)
      activate/deactivate the panel
      void afterSave​(boolean onSaveEvent)
      After save event
      void createUI()
      Render the panel
      boolean dataSave​(boolean onSaveEvent)  
      void dynamicDisplay​(int i)
      Dynamic update of field properties ( visibility, filter and mandatory )
      void editRecord​(boolean b)  
      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()  
      ADTreePanel getTreePanel()  
      void init​(AbstractADWindowContent winPanel, GridTab gridTab)
      Initiate
      boolean isActivated()  
      boolean isChanged()  
      boolean isCurrent()  
      boolean isDetailPaneMode()  
      boolean isEnableCustomizeButton()  
      boolean isEnableProcessButton()  
      boolean isEnableQuickFormButton()  
      boolean isGridView()  
      void loadData()  
      boolean needSave​(boolean rowChange, boolean onlyRealChange)  
      boolean onEnterKey()
      Enter key event
      void query()
      retrieve data from db
      void query​(boolean currentRows, int currentDays, int i)
      retrieve data from db
      void refresh()
      Refresh from db
      void registerAPanel​(AbstractADWindowContent panel)  
      void resetDetailForNewParentRecord()
      reset detail data grid when parent tab current record is new and not saved yet
      void saveData()
      (non-Javadoc)
      void setDetailPane​(DetailPane detailPane)  
      void setDetailPaneMode​(boolean detailMode)  
      void setIsChanged​(boolean value)
      Set tab change status.
      void setTabNo​(int tabNo)  
      void switchRowPresentation()
      Toggle between grid and form 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, focus, 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, 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, setParent, 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, setParent, 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.ext.Scope

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

      • log

        protected static final CLogger log
        Logger
    • Constructor Detail

      • ADSortTab

        public ADSortTab()
    • Method Detail

      • loadData

        public void loadData()
      • setIsChanged

        public void setIsChanged​(boolean value)
        Set tab change status.
        Parameters:
        value -
      • isChanged

        public boolean isChanged()
      • saveData

        public void saveData()
        (non-Javadoc)
      • activate

        public void activate​(boolean b)
        Description copied from interface: IADTabpanel
        activate/deactivate the panel
        Specified by:
        activate in interface IADTabpanel
      • createUI

        public void createUI()
        Description copied from interface: IADTabpanel
        Render the panel
        Specified by:
        createUI in interface IADTabpanel
      • dynamicDisplay

        public void dynamicDisplay​(int i)
        Description copied from interface: IADTabpanel
        Dynamic update of field properties ( visibility, filter and mandatory )
        Specified by:
        dynamicDisplay in interface IADTabpanel
      • editRecord

        public void editRecord​(boolean b)
      • getTabLevel

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

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

        public boolean isCurrent()
        Specified by:
        isCurrent in interface IADTabpanel
        Returns:
        true if refresh is not needed
      • query

        public void query()
        Description copied from interface: IADTabpanel
        retrieve data from db
        Specified by:
        query in interface IADTabpanel
      • query

        public void query​(boolean currentRows,
                          int currentDays,
                          int i)
        Description copied from interface: IADTabpanel
        retrieve data from db
        Specified by:
        query in interface IADTabpanel
      • refresh

        public void refresh()
        Description copied from interface: IADTabpanel
        Refresh from db
        Specified by:
        refresh in interface IADTabpanel
      • 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 - name
        Returns:
        value
      • afterSave

        public void afterSave​(boolean onSaveEvent)
        Description copied from interface: IADTabpanel
        After save event
        Specified by:
        afterSave in interface IADTabpanel
      • onEnterKey

        public boolean onEnterKey()
        Description copied from interface: IADTabpanel
        Enter key event
        Specified by:
        onEnterKey in interface IADTabpanel
        Returns:
        true if the event is process
      • 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
      • isDetailPaneMode

        public boolean isDetailPaneMode()
        Specified by:
        isDetailPaneMode in interface IADTabpanel
        Returns:
        true if the panel is in detailpane node
      • 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
      • 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 )
      • resetDetailForNewParentRecord

        public void resetDetailForNewParentRecord()
        Description copied from interface: IADTabpanel
        reset detail data grid when parent tab current record is new and not saved yet
        Specified by:
        resetDetailForNewParentRecord in interface IADTabpanel
      • isEnableQuickFormButton

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

        public List<org.zkoss.zul.Button> getToolbarButtons()
        Specified by:
        getToolbarButtons in interface IADTabpanel
        Returns:
        List of toolbar buttons
      • isEnableCustomizeButton

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

        public boolean isEnableProcessButton()
        Specified by:
        isEnableProcessButton in interface IADTabpanel
        Returns:
        process Button Enabled/Disabled
      • 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