Package org.adempiere.webui.adwindow
Interface IADTabpanel
- All Superinterfaces:
Cloneable,org.zkoss.zk.ui.Component,Evaluatee,org.zkoss.zk.ui.ext.Scope,Serializable
- All Known Implementing Classes:
ADSortTab,ADTabpanel
Interface for AD_Tab panel component (with all the AD_Fields definition)
- Author:
- Low Heng Sin
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringComponent boolean attribute to indicate ON_ACTIVATE_EVENT have been posted for the current execution cyclestatic final StringActivate/Deactivate event for IADTabpanel.Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(boolean b) Activate/deactivate this IADTabpanel instance.
Call by init or after tab selection changed.voidafterSave(boolean onSaveEvent) Handle after save eventvoidcreateUI()Layout fields of the tab panelbooleandataSave(boolean onSaveEvent) Save changes.
CallGridTab.dataSave(boolean)voiddynamicDisplay(int col) Dynamic update of every field's UI properties ( visibility, filter and mandatory ).Get parent detail paneGet display logicGet GridTab of tabGet GridView componentintGet record id of current rowGet table nameintGet tab levelintgetTabNo()Get tab nogetTitle()Get title of tabList<org.zkoss.zul.Button>Get toolbar buttonsGet tree panel componentvoidinit(AbstractADWindowContent winPanel, GridTab gridTab) Initialized tab panelbooleanIs tab panel have been activatedbooleanIs current row not stallbooleanIs tab panel in detail pane modedefault booleanGet is detail pane visiblebooleanIs customize grid button enabledefault booleanIs process button enablebooleanIs quick form enabledbooleanIs tab panel showing grid viewbooleanneedSave(boolean rowChange, boolean onlyRealChange) voidAfter Find window closes switch to grid view if configuredbooleanHandle enter key eventvoidquery()Execute query through the backedGridTabinstance.voidquery(boolean currentRows, int currentDays, int maxRows) voidrefresh()Refresh data through the backedGridTabinstance.voidReset detail data grid when current record of parent tab is new and not saved yet.
CallGridTab.resetDetailForNewParentRecord()voidsetDetailPane(DetailPane detailPane) Set theDetailPanepart that own this IADTabpanel instancevoidsetDetailPaneMode(boolean detailMode) Turn on/off detail mode, i.e whether tab panel is currently a header or detail tab of the window.voidsetTabNo(int tabNo) Set tab number/sequence within an AD_WindowvoidSwitch between grid and form viewvoidupdateDetailToolbar(org.zkoss.zul.Toolbar toolbar) UpdateDetailPanetoolbar buttons statevoidupdateToolbar(ADWindowToolbar toolbar) Update ADWindowToolbar buttons stateMethods 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, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getShadowVariable, getShadowVariable, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, 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, setWidgetClass, setWidgetListener, setWidgetOverrideMethods inherited from interface org.compiere.util.Evaluatee
get_ValueAsStringMethods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
-
Field Details
-
ON_ACTIVATE_EVENT
Activate/Deactivate event for IADTabpanel. Fire for init or after tab selection changed.- See Also:
-
ATTR_ON_ACTIVATE_POSTED
Component boolean attribute to indicate ON_ACTIVATE_EVENT have been posted for the current execution cycle- See Also:
-
-
Method Details
-
init
Initialized tab panel- Parameters:
winPanel-gridTab-
-
getDisplayLogic
String getDisplayLogic()Get display logic- Returns:
- display logic
-
getTabLevel
int getTabLevel()Get tab level- Returns:
- tab level
-
getTableName
String getTableName()Get table name- Returns:
- table name from GridTab
-
getRecord_ID
int getRecord_ID()Get record id of current row- Returns:
- record ID of current row
-
isCurrent
boolean isCurrent()Is current row not stall- Returns:
- true if refresh is not needed
-
getTitle
String getTitle()Get title of tab- Returns:
- title of tab
-
createUI
void createUI()Layout fields of the tab panel -
getGridTab
GridTab getGridTab()Get GridTab of tab- Returns:
GridTabinstance that back this IADTabpanel instance
-
activate
void activate(boolean b) Activate/deactivate this IADTabpanel instance.
Call by init or after tab selection changed.- Parameters:
b-
-
query
void query()Execute query through the backedGridTabinstance. -
refresh
void refresh()Refresh data through the backedGridTabinstance. -
query
void query(boolean currentRows, int currentDays, int maxRows) - Parameters:
currentRows-currentDays-maxRows-
-
switchRowPresentation
void switchRowPresentation()Switch between grid and form view -
onAfterFind
void onAfterFind()After Find window closes switch to grid view if configured -
dynamicDisplay
void dynamicDisplay(int col) Dynamic update of every field's UI properties ( visibility, filter and mandatory ).- Parameters:
col- optional column name
-
afterSave
void afterSave(boolean onSaveEvent) Handle after save event- Parameters:
onSaveEvent-
-
onEnterKey
boolean onEnterKey()Handle enter key event- Returns:
- true if the event is process
-
isGridView
boolean isGridView()Is tab panel showing grid view- Returns:
- true if current presentation of the tab panel is grid/list view
-
isActivated
boolean isActivated()Is tab panel have been activated- Returns:
- true if the tab panel have been activated
-
setDetailPaneMode
void setDetailPaneMode(boolean detailMode) Turn on/off detail mode, i.e whether tab panel is currently a header or detail tab of the window.- Parameters:
detailMode-
-
isDetailPaneMode
boolean isDetailPaneMode()Is tab panel in detail pane mode- Returns:
- true if the panel is in detail mode (i.e a tab in DetailPane)
-
getGridView
GridView getGridView()Get GridView component- Returns:
GridViewinstance
-
needSave
boolean needSave(boolean rowChange, boolean onlyRealChange) - Parameters:
rowChange-onlyRealChange-- Returns:
- true if there are pending changes
-
dataSave
boolean dataSave(boolean onSaveEvent) Save changes.
CallGridTab.dataSave(boolean)- Parameters:
onSaveEvent-- Returns:
- true if the save operation completed successfully
-
setTabNo
void setTabNo(int tabNo) Set tab number/sequence within an AD_Window- Parameters:
tabNo-
-
getTabNo
int getTabNo()Get tab no- Returns:
- tab no ( ad_tab.tabno )
-
setDetailPane
Set theDetailPanepart that own this IADTabpanel instance- Parameters:
detailPane-
-
getDetailPane
DetailPane getDetailPane()Get parent detail pane- Returns:
- the
DetailPanepart that own this IADTabpanel instance
-
resetDetailForNewParentRecord
void resetDetailForNewParentRecord()Reset detail data grid when current record of parent tab is new and not saved yet.
CallGridTab.resetDetailForNewParentRecord() -
getTreePanel
ADTreePanel getTreePanel()Get tree panel component- Returns:
ADTreePanelinstance
-
isEnableQuickFormButton
boolean isEnableQuickFormButton()Is quick form enabled- Returns:
- true if Quick Form Button is Enabled
-
isDetailVisible
default boolean isDetailVisible()Get is detail pane visible- Returns:
- true if the containing
DetailPaneinstance is visible
-
getToolbarButtons
List<org.zkoss.zul.Button> getToolbarButtons()Get toolbar buttons- Returns:
- List of toolbar buttons
-
isEnableCustomizeButton
boolean isEnableCustomizeButton()Is customize grid button enable- Returns:
- true if customize grid button is enabled
-
isEnableProcessButton
default boolean isEnableProcessButton()Is process button enable- Returns:
- true if process Button is Enabled
-
updateToolbar
Update ADWindowToolbar buttons state- Parameters:
toolbar- -ADWindowToolbar
-
updateDetailToolbar
void updateDetailToolbar(org.zkoss.zul.Toolbar toolbar) UpdateDetailPanetoolbar buttons state- Parameters:
toolbar- -Toolbar
-