IDEMPIERE-785 Save and new button is not working.

This commit is contained in:
Heng Sin Low 2013-03-21 14:43:53 +08:00
parent 9b89a3cfa2
commit 4e038d62bb
3 changed files with 5 additions and 15 deletions

View File

@ -971,17 +971,11 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
public void focusToFirstEditor() { public void focusToFirstEditor() {
WEditor toFocus = null; WEditor toFocus = null;
for (WEditor editor : editors) { for (WEditor editor : editors) {
if (editor.isVisible() && editor.getComponent().getParent() != null) { if (editor.isVisible() && editor.isReadWrite() && editor.getComponent().getParent() != null
&& !(editor instanceof WImageEditor)) {
toFocus = editor; toFocus = editor;
break; break;
} }
if (toFocus == null) {
if (editor.isVisible() && editor.isReadWrite() && editor.getComponent().getParent() != null
&& !(editor instanceof WImageEditor)) {
toFocus = editor;
}
}
} }
if (toFocus != null) { if (toFocus != null) {
focusToEditor(toFocus); focusToEditor(toFocus);

View File

@ -1923,7 +1923,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
} }
} }
if (dirtyTabpanel != null && dirtyTabpanel.getGridTab().isDetail()) { if (dirtyTabpanel != null && dirtyTabpanel != adTabbox.getSelectedTabpanel()) {
Executions.getCurrent().setAttribute("adtabpane.saved", dirtyTabpanel); Executions.getCurrent().setAttribute("adtabpane.saved", dirtyTabpanel);
dirtyTabpanel.getGridTab().refreshParentTabs(); dirtyTabpanel.getGridTab().refreshParentTabs();
} }

View File

@ -586,13 +586,9 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
WEditor firstEditor = null; WEditor firstEditor = null;
for (WEditor editor : getEditors()) { for (WEditor editor : getEditors()) {
if (editor.isVisible() && editor.getComponent().getParent() != null) { if (editor.isVisible() && editor.getComponent().getParent() != null) {
toFocus = editor; if (editor.isReadWrite()) {
break;
}
if (editor.isVisible() && editor.getComponent().getParent() != null) {
if (toFocus == null && editor.isReadWrite()) {
toFocus = editor; toFocus = editor;
break;
} }
if (firstEditor == null) if (firstEditor == null)
firstEditor = editor; firstEditor = editor;