Package org.adempiere.webui.adwindow
Class CompositeADTabbox
java.lang.Object
org.adempiere.webui.part.AbstractUIPart
org.adempiere.webui.adwindow.AbstractADTabbox
org.adempiere.webui.adwindow.CompositeADTabbox
- All Implemented Interfaces:
IADTabbox,ISupportMask,UIPart
Header and detail controller for AD_Tabs.
This class manage a list of tabs with the current selected tab as the visible
Child tabs of selected tab is shown in
This class manage a list of tabs with the current selected tab as the visible
ADTabpanel instance.Child tabs of selected tab is shown in
DetailPane using Tabbox.- Author:
- Ashley G Ramdass, Low Heng Sin
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringExecution attribute to hold reference to detail ADTabpanel that's handling onEditDetail eventstatic final Stringtab selection change eventFields inherited from class org.adempiere.webui.adwindow.AbstractADTabbox
adWindowPanel, tabPanelListFields inherited from class org.adempiere.webui.part.AbstractUIPart
page, showMaskWrapperFields inherited from interface org.adempiere.webui.ISupportMask
READY_SHOW_MASK_FLAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DetailPaneCreate detail panel at bottomvoidIgnore/undo all pending changesbooleandataSave(boolean onSaveEvent) Save changesprotected voiddoAddTab(GridTab gTab, IADTabpanel tabPanel) Handle add new tab to UI.
Override to implement add new tab to UI.protected org.zkoss.zk.ui.ComponentdoCreatePart(org.zkoss.zk.ui.Component parent) Create layout and setup listeners for bread crumb.
Vertical layout withADTabpanelas the only child component.protected voiddoTabSelectionChanged(int oldIndex, int newIndex) Handle tab selection change event.
Override to update UI for tab selection change.findADTabpanel(GridTab gTab) Find IADTabpanel by GridTaborg.zkoss.zk.ui.ComponentGet root component of UI blockGet IADTabpanel that has pending changes to saveGet IADTabpanel of selected detail tabGet Grid of selected header tabintGet selected header tab indexReturn the selected Tab PanelbooleanbooleanIs detail pane loadedbooleanIs current selected header tab a sort tabbooleanneedSave(boolean rowChange, boolean onlyRealChange) Is current selected header or detail tab has pending changes to save CallIADTabpanel.needSave(boolean, boolean)voidEdit current row of selected detail tab.
The selected detail tab will become the new header tab.protected voidonEditDetail(int row, boolean formView) Edit current row of selected detail tab.
Make selected detail tab the new header tab.voidsetDetailPaneSelectedTab(int adTabNo, int currentRow) Set selected tab ofDetailPaneto tabIndex.voidsetDetailPaneStatusMessage(String status, boolean error) Update status text ofDetailPanevoidsetSelectionEventListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener) Set event listener for tab selection change eventvoidupdateDetailPaneToolbar(boolean changed, boolean readOnly) Update state of detail pane toolbar.
CallDetailPane.updateToolbar(boolean, boolean)booleanupdateSelectedIndex(int oldIndex, int newIndex) Change selected tab index from oldIndex to newIndex.
Delegate toAbstractADTabbox.doTabSelectionChanged(int, int).protected voidUpdate UI state of tab (visibility, activation and if need invalidate)Methods inherited from class org.adempiere.webui.adwindow.AbstractADTabbox
addTab, canNavigateTo, canNavigateTo, evaluate, getADTabpanel, getPath, getTabCount, isDisplay, isEnabledAt, setADWindowPanel, setSelectedIndexMethods inherited from class org.adempiere.webui.part.AbstractUIPart
createPart, getMaskComponent, getMaskObj, hideMask, showMaskMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.adempiere.webui.part.UIPart
createPart
-
Field Details
-
AD_TABBOX_ON_EDIT_DETAIL_ATTRIBUTE
Execution attribute to hold reference to detail ADTabpanel that's handling onEditDetail event- See Also:
-
ON_SELECTION_CHANGED_EVENT
tab selection change event- See Also:
-
-
Constructor Details
-
CompositeADTabbox
public CompositeADTabbox()default constructor
-
-
Method Details
-
createDetailPane
Create detail panel at bottom- Returns:
DetailPane
-
onEditDetail
protected void onEditDetail(int row, boolean formView) Edit current row of selected detail tab.
Make selected detail tab the new header tab.- Parameters:
row-formView-
-
doCreatePart
protected org.zkoss.zk.ui.Component doCreatePart(org.zkoss.zk.ui.Component parent) Create layout and setup listeners for bread crumb.
Vertical layout withADTabpanelas the only child component.- Specified by:
doCreatePartin classAbstractUIPart- Parameters:
parent- parent Component or null for root UI block- Returns:
- Component
-
doAddTab
Description copied from class:AbstractADTabboxHandle add new tab to UI.
Override to implement add new tab to UI.- Specified by:
doAddTabin classAbstractADTabbox
-
updateSelectedIndex
public boolean updateSelectedIndex(int oldIndex, int newIndex) Description copied from class:AbstractADTabboxChange selected tab index from oldIndex to newIndex.
Delegate toAbstractADTabbox.doTabSelectionChanged(int, int).- Specified by:
updateSelectedIndexin interfaceIADTabbox- Overrides:
updateSelectedIndexin classAbstractADTabbox- Returns:
- true if successfully switch to newIndex
-
updateTabState
protected void updateTabState()Description copied from class:AbstractADTabboxUpdate UI state of tab (visibility, activation and if need invalidate)- Specified by:
updateTabStatein classAbstractADTabbox
-
getSelectedTabpanel
Return the selected Tab Panel- Returns:
- selected header
IADTabpanelinstance
-
getSelectedIndex
public int getSelectedIndex()Description copied from interface:IADTabboxGet selected header tab index- Returns:
- selected header tab index
-
setSelectionEventListener
public void setSelectionEventListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener) Description copied from interface:IADTabboxSet event listener for tab selection change event -
doTabSelectionChanged
protected void doTabSelectionChanged(int oldIndex, int newIndex) Description copied from class:AbstractADTabboxHandle tab selection change event.
Override to update UI for tab selection change.- Specified by:
doTabSelectionChangedin classAbstractADTabbox
-
getComponent
public org.zkoss.zk.ui.Component getComponent()Description copied from interface:UIPartGet root component of UI block- Returns:
- Component
-
findADTabpanel
Description copied from interface:IADTabboxFind IADTabpanel by GridTab- Returns:
IADTabpanelinstance for gTab or null if not found
-
onDetailRecord
public void onDetailRecord()Description copied from interface:IADTabboxEdit current row of selected detail tab.
The selected detail tab will become the new header tab. -
isDetailActivated
public boolean isDetailActivated()- Returns:
- true if selected detail tab have been activated
-
isSortTab
public boolean isSortTab()Description copied from interface:IADTabboxIs current selected header tab a sort tab- Returns:
- true if current header tab is a sort tab
-
getSelectedDetailADTabpanel
Description copied from interface:IADTabboxGet IADTabpanel of selected detail tab- Returns:
- the selected detail
IADTabpanelinstance
-
needSave
public boolean needSave(boolean rowChange, boolean onlyRealChange) Description copied from interface:IADTabboxIs current selected header or detail tab has pending changes to save CallIADTabpanel.needSave(boolean, boolean)- Returns:
- true if there are changes pending to be save
-
dataIgnore
public void dataIgnore()Description copied from interface:IADTabboxIgnore/undo all pending changes -
getSelectedGridTab
Description copied from interface:IADTabboxGet Grid of selected header tab- Returns:
GridTabinstance of header tab
-
dataSave
public boolean dataSave(boolean onSaveEvent) Description copied from interface:IADTabboxSave changes- Returns:
- true if save is successful
-
setDetailPaneStatusMessage
Description copied from interface:IADTabboxUpdate status text ofDetailPane -
getDirtyADTabpanel
Description copied from interface:IADTabboxGet IADTabpanel that has pending changes to save- Returns:
- dirty
IADTabpanelthat need save ( if any )
-
updateDetailPaneToolbar
public void updateDetailPaneToolbar(boolean changed, boolean readOnly) Description copied from interface:IADTabboxUpdate state of detail pane toolbar.
CallDetailPane.updateToolbar(boolean, boolean)- Parameters:
changed- true if header tab has changedreadOnly- true if header tab is readonly
-
isDetailPaneLoaded
public boolean isDetailPaneLoaded()Description copied from interface:IADTabboxIs detail pane loaded- Returns:
- true if all the tabs of detail pane have been linked up with header tab
-
setDetailPaneSelectedTab
public void setDetailPaneSelectedTab(int adTabNo, int currentRow) Description copied from interface:IADTabboxSet selected tab ofDetailPaneto tabIndex.currentRow- set current row of tab at tabIndex to currentRow
-