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() {
WEditor toFocus = null;
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;
break;
}
if (toFocus == null) {
if (editor.isVisible() && editor.isReadWrite() && editor.getComponent().getParent() != null
&& !(editor instanceof WImageEditor)) {
toFocus = editor;
}
}
}
if (toFocus != null) {
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);
dirtyTabpanel.getGridTab().refreshParentTabs();
}

View File

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