diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 930f06433e..a68ced4d61 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -513,6 +513,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements @Override public void onEvent(Event event) throws Exception { onNew(); + ADTabpanel adtabpanel = (ADTabpanel) getADTab().getSelectedTabpanel(); + adtabpanel.focusToFirstEditor(false); } }, new Event("onInsert")); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java index 9a554978f1..e85fc1d841 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java @@ -18,13 +18,13 @@ import static org.compiere.model.SystemIDs.TREE_MENUPRIMARY; import java.util.Enumeration; import org.adempiere.util.Callback; +import org.adempiere.webui.adwindow.ADTabpanel; import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.exception.ApplicationException; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ITheme; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.window.FDialog; -import org.compiere.model.GridTab; import org.compiere.model.MMenu; import org.compiere.model.MQuery; import org.compiere.model.MTree; @@ -279,8 +279,9 @@ public class DPFavourites extends DashboardPanel implements EventListener if(result == null) return; - GridTab tab = result.getADWindowContent().getActiveGridTab(); - tab.dataNew(false); + result.getADWindowContent().onNew(); + ADTabpanel adtabpanel = (ADTabpanel) result.getADWindowContent().getADTab().getSelectedTabpanel(); + adtabpanel.focusToFirstEditor(false); } }); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java index 8fe5986ee7..3b51b47991 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java @@ -28,6 +28,7 @@ import java.util.logging.Level; import org.adempiere.util.Callback; import org.adempiere.webui.ValuePreference; +import org.adempiere.webui.adwindow.ADTabpanel; import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.adwindow.IFieldEditorContainer; import org.adempiere.webui.apps.AEnv; @@ -45,7 +46,6 @@ import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.window.WFieldRecordInfo; import org.compiere.model.GridField; -import org.compiere.model.GridTab; import org.compiere.model.Lookup; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; @@ -310,8 +310,9 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value if(result == null) return; - GridTab tab = result.getADWindowContent().getActiveGridTab(); - tab.dataNew(false); + result.getADWindowContent().onNew(); + ADTabpanel adtabpanel = (ADTabpanel) result.getADWindowContent().getADTab().getSelectedTabpanel(); + adtabpanel.focusToFirstEditor(false); } }); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java index 35aab5f51e..777dc0d9c5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java @@ -21,11 +21,11 @@ import java.util.Enumeration; import java.util.Properties; import org.adempiere.util.Callback; +import org.adempiere.webui.adwindow.ADTabpanel; import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.exception.ApplicationException; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ThemeManager; -import org.compiere.model.GridTab; import org.compiere.model.MMenu; import org.compiere.model.MQuery; import org.compiere.model.MTree; @@ -312,8 +312,9 @@ public abstract class AbstractMenuPanel extends Panel implements EventListener