Fixed tab context preparation error.
This commit is contained in:
parent
1d5b1541dd
commit
b81502f138
|
@ -23,6 +23,7 @@ import java.util.List;
|
|||
|
||||
import org.adempiere.webui.panel.ADSortTab;
|
||||
import org.adempiere.webui.panel.ADTabpanel;
|
||||
import org.adempiere.webui.panel.AbstractADWindowPanel;
|
||||
import org.adempiere.webui.panel.IADTabpanel;
|
||||
import org.adempiere.webui.part.AbstractUIPart;
|
||||
import org.compiere.model.DataStatusEvent;
|
||||
|
@ -48,6 +49,7 @@ public abstract class AbstractADTab extends AbstractUIPart implements IADTab
|
|||
|
||||
/** Tabs associated to this tab box */
|
||||
protected List<IADTabpanel> tabPanelList = new ArrayList<IADTabpanel>();
|
||||
protected AbstractADWindowPanel adWindowPanel;
|
||||
|
||||
public AbstractADTab()
|
||||
{
|
||||
|
@ -133,7 +135,7 @@ public abstract class AbstractADTab extends AbstractUIPart implements IADTab
|
|||
|
||||
private void prepareContext(int newIndex, IADTabpanel newTab) {
|
||||
//update context
|
||||
if (newTab != null)
|
||||
if (newTab != null && (adWindowPanel == null || !adWindowPanel.isEmbedded()))
|
||||
{
|
||||
List<Integer> parents = new ArrayList<Integer>();
|
||||
//get parent list, always include first tab (0)
|
||||
|
@ -324,4 +326,8 @@ public abstract class AbstractADTab extends AbstractUIPart implements IADTab
|
|||
int oldIndex = getSelectedIndex();
|
||||
updateSelectedIndex(oldIndex, newIndex);
|
||||
}
|
||||
|
||||
public void setADWindowPanel(AbstractADWindowPanel abstractADWindowPanel) {
|
||||
this.adWindowPanel = abstractADWindowPanel;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
*****************************************************************************/
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import org.adempiere.webui.panel.AbstractADWindowPanel;
|
||||
import org.adempiere.webui.panel.IADTabpanel;
|
||||
import org.adempiere.webui.part.UIPart;
|
||||
import org.compiere.model.DataStatusEvent;
|
||||
|
@ -125,4 +126,10 @@ public interface IADTab extends UIPart {
|
|||
* @return IADTabpanel or null if not found
|
||||
*/
|
||||
public IADTabpanel findADTabpanel(GridTab gTab);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param abstractADWindowPanel
|
||||
*/
|
||||
public void setADWindowPanel(AbstractADWindowPanel abstractADWindowPanel);
|
||||
}
|
||||
|
|
|
@ -209,6 +209,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
|
|||
|
||||
adTab = createADTab();
|
||||
adTab.addSelectionEventListener(this);
|
||||
adTab.setADWindowPanel(this);
|
||||
|
||||
return super.createPart(parent);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue