IDEMPIERE-5177 - Fiixed search in detail broken after navigating betw… (#1396)
* IDEMPIERE-5177 - Fiixed search in detail broken after navigating between master records * IDEMPIERE-5177 - Fixed search in detail broken after navigating between master records
This commit is contained in:
parent
edc590967e
commit
090893e051
|
@ -2305,9 +2305,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
private void doOnFind() {
|
||||
// Gets Fields from AD_Field_v
|
||||
GridField[] findFields = adTabbox.getSelectedGridTab().getFields();
|
||||
if (getCurrentFindWindow() == null || !getCurrentFindWindow().validate(adTabbox.getSelectedGridTab().getWindowNo(), adTabbox.getSelectedGridTab().getName(),
|
||||
adTabbox.getSelectedGridTab().getAD_Table_ID(), adTabbox.getSelectedGridTab().getTableName(),
|
||||
adTabbox.getSelectedGridTab().getWhereExtended(), findFields, 1, adTabbox.getSelectedGridTab().getAD_Tab_ID())) {
|
||||
if (!isCurrentFindWindowValid()) {
|
||||
if (!getFindWindow(findFields))
|
||||
return;
|
||||
}
|
||||
|
@ -2370,6 +2368,22 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
showBusyMask(getCurrentFindWindow());
|
||||
LayoutUtils.openEmbeddedWindow(toolbar, getCurrentFindWindow(), "after_start");
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates if the current FindWindow corresponds to the actve tab and record
|
||||
* @return true if the current find window is good to use
|
||||
*/
|
||||
private boolean isCurrentFindWindowValid() {
|
||||
GridField[] findFields = adTabbox.getSelectedGridTab().getFields();
|
||||
return getCurrentFindWindow() != null && getCurrentFindWindow().validate(adTabbox.getSelectedGridTab().getWindowNo(),
|
||||
adTabbox.getSelectedGridTab().getName(),
|
||||
adTabbox.getSelectedGridTab().getAD_Table_ID(),
|
||||
adTabbox.getSelectedGridTab().getTableName(),
|
||||
adTabbox.getSelectedGridTab().getWhereExtended(),
|
||||
findFields,
|
||||
1,
|
||||
adTabbox.getSelectedGridTab().getAD_Tab_ID());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onIgnore()
|
||||
|
@ -3200,10 +3214,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
public void doOnQueryChange() {
|
||||
// Gets Fields from AD_Field_v
|
||||
GridField[] findFields = adTabbox.getSelectedGridTab().getFields();
|
||||
if (getCurrentFindWindow() == null || !getCurrentFindWindow().validate(adTabbox.getSelectedGridTab().getWindowNo(), adTabbox.getSelectedGridTab().getName(),
|
||||
adTabbox.getSelectedGridTab().getAD_Table_ID(), adTabbox.getSelectedGridTab().getTableName(),
|
||||
adTabbox.getSelectedGridTab().getWhereExtended(), findFields, 1, adTabbox.getSelectedGridTab().getAD_Tab_ID())) {
|
||||
|
||||
if (!isCurrentFindWindowValid()) {
|
||||
if (!getFindWindow(findFields))
|
||||
return;
|
||||
}
|
||||
|
@ -3944,9 +3955,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
}
|
||||
|
||||
public boolean getFindWindow(GridField[] findFields) {
|
||||
FindWindow findWindow;
|
||||
if (tabFindWindowHashMap.get(adTabbox.getSelectedGridTab()) != null) {
|
||||
findWindow = tabFindWindowHashMap.get(adTabbox.getSelectedGridTab());
|
||||
FindWindow findWindow = getCurrentFindWindow();
|
||||
if (findWindow != null && isCurrentFindWindowValid()) {
|
||||
toolbar.setSelectedUserQuery(findWindow.getAD_UserQuery_ID());
|
||||
} else {
|
||||
findWindow = new FindWindow (adTabbox.getSelectedGridTab().getWindowNo(), adTabbox.getSelectedGridTab().getTabNo(), adTabbox.getSelectedGridTab().getName(),
|
||||
|
|
Loading…
Reference in New Issue