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 UI for AD_Tabs.
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
.- Version:
- $Revision: 0.10 $
- 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.protected org.zkoss.zk.ui.Component
doCreatePart
(org.zkoss.zk.ui.Component parent) Create layout and setup listeners for bread crumb.protected void
doTabSelectionChanged
(int oldIndex, int newIndex) Handle tab selection change event.findADTabpanel
(GridTab gTab) org.zkoss.zk.ui.Component
int
Return the selected Tab Panelboolean
boolean
boolean
boolean
needSave
(boolean rowChange, boolean onlyRealChange) void
Edit current row of selected detail tab.protected void
onEditDetail
(int row, boolean formView) Edit current row of selected detail 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) boolean
updateSelectedIndex
(int oldIndex, int newIndex) Change selected tab index from oldIndex to newIndex.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()- 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()- Returns:
- Component
-
findADTabpanel
- 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()- Returns:
- true if current header tab is a sort tab
-
getSelectedDetailADTabpanel
- Returns:
- the selected detail
IADTabpanel
instance
-
needSave
public boolean needSave(boolean rowChange, boolean onlyRealChange) Description copied from interface:IADTabbox
- 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
- 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
- Returns:
- dirty
IADTabpanel
that need save ( if any )
-
updateDetailPaneToolbar
public void updateDetailPaneToolbar(boolean changed, boolean readOnly) Description copied from interface:IADTabbox
- Parameters:
changed
- true if header tab has changedreadOnly
- true if header tab is readonly
-
isDetailPaneLoaded
public boolean isDetailPaneLoaded()- 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
-