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
Modifier and TypeFieldDescriptionstatic final String
Execution attribute to hold reference to detail ADTabpanel that's handling onEditDetail eventstatic final String
tab selection change eventFields inherited from class org.adempiere.webui.adwindow.AbstractADTabbox
adWindowPanel
Fields inherited from class org.adempiere.webui.part.AbstractUIPart
page, showMaskWrapper
Fields inherited from interface org.adempiere.webui.ISupportMask
READY_SHOW_MASK_FLAG
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected DetailPane
Create detail panel at bottomvoid
Ignore/undo all pending changesboolean
dataSave
(boolean onSaveEvent) Save changesprotected void
doAddTab
(GridTab gTab, IADTabpanel tabPanel) Handle add new tab to UI.
Override to implement add new tab to UI.protected org.zkoss.zk.ui.Component
doCreatePart
(org.zkoss.zk.ui.Component parent) Create layout and setup listeners for bread crumb.
Vertical layout withADTabpanel
as the only child component.protected void
doTabSelectionChanged
(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.Component
Get root component of UI blockGet IADTabpanel that has pending changes to saveGet IADTabpanel of selected detail tabGet Grid of selected header tabint
Get selected header tab indexReturn the selected Tab Panelboolean
boolean
Is detail pane loadedboolean
Is current selected header tab a sort tabboolean
needSave
(boolean rowChange, boolean onlyRealChange) Is current selected header or detail tab has pending changes to save CallIADTabpanel.needSave(boolean, boolean)
void
Edit current row of selected detail tab.
The selected detail tab will become the new header tab.protected void
onEditDetail
(int row, boolean formView) Edit current row of selected detail tab.
Make selected detail tab the new header tab.void
setDetailPaneSelectedTab
(int adTabNo, int currentRow) Set selected tab ofDetailPane
to tabIndex.void
setDetailPaneStatusMessage
(String status, boolean error) Update status text ofDetailPane
void
setSelectionEventListener
(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener) Set event listener for tab selection change eventvoid
updateDetailPaneToolbar
(boolean changed, boolean readOnly) Update state of detail pane toolbar.
CallDetailPane.updateToolbar(boolean, boolean)
boolean
updateSelectedIndex
(int oldIndex, int newIndex) Change selected tab index from oldIndex to newIndex.
Delegate toAbstractADTabbox.doTabSelectionChanged(int, int)
.protected void
Update 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, setSelectedIndex
Methods inherited from class org.adempiere.webui.part.AbstractUIPart
createPart, getMaskComponent, getMaskObj, hideMask, showMask
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 withADTabpanel
as the only child component.- Specified by:
doCreatePart
in classAbstractUIPart
- Parameters:
parent
- parent Component or null for root UI block- Returns:
- Component
-
doAddTab
Description copied from class:AbstractADTabbox
Handle add new tab to UI.
Override to implement add new tab to UI.- Specified by:
doAddTab
in classAbstractADTabbox
-
updateSelectedIndex
public boolean updateSelectedIndex(int oldIndex, int newIndex) Description copied from class:AbstractADTabbox
Change selected tab index from oldIndex to newIndex.
Delegate toAbstractADTabbox.doTabSelectionChanged(int, int)
.- Specified by:
updateSelectedIndex
in interfaceIADTabbox
- Overrides:
updateSelectedIndex
in classAbstractADTabbox
- Returns:
- true if successfully switch to newIndex
-
updateTabState
protected void updateTabState()Description copied from class:AbstractADTabbox
Update UI state of tab (visibility, activation and if need invalidate)- Specified by:
updateTabState
in classAbstractADTabbox
-
getSelectedTabpanel
Return the selected Tab Panel- Returns:
- selected header
IADTabpanel
instance
-
getSelectedIndex
public int getSelectedIndex()Description copied from interface:IADTabbox
Get 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:IADTabbox
Set event listener for tab selection change event -
doTabSelectionChanged
protected void doTabSelectionChanged(int oldIndex, int newIndex) Description copied from class:AbstractADTabbox
Handle tab selection change event.
Override to update UI for tab selection change.- Specified by:
doTabSelectionChanged
in classAbstractADTabbox
-
getComponent
public org.zkoss.zk.ui.Component getComponent()Description copied from interface:UIPart
Get root component of UI block- Returns:
- Component
-
findADTabpanel
Description copied from interface:IADTabbox
Find IADTabpanel by GridTab- Returns:
IADTabpanel
instance for gTab or null if not found
-
onDetailRecord
public void onDetailRecord()Description copied from interface:IADTabbox
Edit 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:IADTabbox
Is current selected header tab a sort tab- Returns:
- true if current header tab is a sort tab
-
getSelectedDetailADTabpanel
Description copied from interface:IADTabbox
Get IADTabpanel of selected detail tab- Returns:
- the selected detail
IADTabpanel
instance
-
needSave
public boolean needSave(boolean rowChange, boolean onlyRealChange) Description copied from interface:IADTabbox
Is 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:IADTabbox
Ignore/undo all pending changes -
getSelectedGridTab
Description copied from interface:IADTabbox
Get Grid of selected header tab- Returns:
GridTab
instance of header tab
-
dataSave
public boolean dataSave(boolean onSaveEvent) Description copied from interface:IADTabbox
Save changes- Returns:
- true if save is successful
-
setDetailPaneStatusMessage
Description copied from interface:IADTabbox
Update status text ofDetailPane
-
getDirtyADTabpanel
Description copied from interface:IADTabbox
Get IADTabpanel that has pending changes to save- Returns:
- dirty
IADTabpanel
that need save ( if any )
-
updateDetailPaneToolbar
public void updateDetailPaneToolbar(boolean changed, boolean readOnly) Description copied from interface:IADTabbox
Update 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:IADTabbox
Is 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:IADTabbox
Set selected tab ofDetailPane
to tabIndex.currentRow
- set current row of tab at tabIndex to currentRow
-