IDEMPIERE-839 Zk: Focus not on first editable field when new record is created through favourite, lookup menu and zoom
This commit is contained in:
parent
3a922e95a4
commit
8677caeb11
|
@ -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"));
|
||||
}
|
||||
|
|
|
@ -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<Event>
|
|||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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<E
|
|||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue