IDEMPIERE-1513 Find Window : should hide simple search tab if there's no selection column define.
This commit is contained in:
parent
5447f06c0f
commit
e391acaf51
|
@ -269,6 +269,13 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!winMain.getComponent().getTabpanel(0).isVisible())
|
||||||
|
{
|
||||||
|
winMain.getComponent().setSelectedIndex(1);
|
||||||
|
onAdvanceTabSelected();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -676,6 +683,12 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
addSelectionColumn (field);
|
addSelectionColumn (field);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_sEditors.isEmpty()) {
|
||||||
|
Tabpanel tabPanel = winMain.getComponent().getTabpanel(0);
|
||||||
|
tabPanel.getLinkedTab().setVisible(false);
|
||||||
|
tabPanel.setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
gridFieldList = null;
|
gridFieldList = null;
|
||||||
m_total = getNoOfRecords(null, false);
|
m_total = getNoOfRecords(null, false);
|
||||||
|
|
||||||
|
@ -1072,16 +1085,9 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
}
|
}
|
||||||
else if (event.getTarget() instanceof Tab) {
|
else if (event.getTarget() instanceof Tab) {
|
||||||
if (winMain.getComponent().getSelectedIndex() == 1) {
|
if (winMain.getComponent().getSelectedIndex() == 1) {
|
||||||
fQueryName.setReadonly(false);
|
onAdvanceTabSelected();
|
||||||
btnSave.setDisabled(m_AD_Tab_ID <= 0);
|
|
||||||
historyCombo.setSelectedItem(null);
|
|
||||||
if (advancedPanel.getItems().size() == 0) {
|
|
||||||
createFields();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
fQueryName.setReadonly(true);
|
onSimpleTabSelected();
|
||||||
btnSave.setDisabled(true);
|
|
||||||
historyCombo.setDisabled(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} //
|
} //
|
||||||
|
@ -1171,6 +1177,21 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
|
|
||||||
} // onEvent
|
} // onEvent
|
||||||
|
|
||||||
|
private void onSimpleTabSelected() {
|
||||||
|
fQueryName.setReadonly(true);
|
||||||
|
btnSave.setDisabled(true);
|
||||||
|
historyCombo.setDisabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onAdvanceTabSelected() {
|
||||||
|
fQueryName.setReadonly(false);
|
||||||
|
btnSave.setDisabled(m_AD_Tab_ID <= 0);
|
||||||
|
historyCombo.setSelectedItem(null);
|
||||||
|
if (advancedPanel.getItems().size() == 0) {
|
||||||
|
createFields();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void parseUserQuery(MUserQuery userQuery)
|
private void parseUserQuery(MUserQuery userQuery)
|
||||||
{
|
{
|
||||||
String code = userQuery.getCode();
|
String code = userQuery.getCode();
|
||||||
|
|
Loading…
Reference in New Issue