- product window broken when hiding initial column
This commit is contained in:
parent
7e698c6883
commit
904289b63b
|
@ -462,7 +462,21 @@ public class GridPanel extends Borderlayout implements EventListener
|
|||
renderer.setFocusToEditor();
|
||||
}
|
||||
} else {
|
||||
Component cmp = row.getFirstChild().getFirstChild().getNextSibling();
|
||||
Component cmp = null;
|
||||
List<?> childs = row.getChildren();
|
||||
for (Object o : childs) {
|
||||
Component c = (Component) o;
|
||||
if (!c.isVisible())
|
||||
continue;
|
||||
c = c.getFirstChild();
|
||||
if (c == null)
|
||||
continue;
|
||||
if (c.getNextSibling() != null) {
|
||||
cmp = c.getNextSibling();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cmp != null)
|
||||
Clients.response(new AuScript(null, "scrollToRow('" + cmp.getUuid() + "');"));
|
||||
|
||||
if (columnOnClick != null && columnOnClick.trim().length() > 0) {
|
||||
|
|
|
@ -26,6 +26,7 @@ package org.adempiere.webui.panel;
|
|||
import java.text.MessageFormat;
|
||||
import java.util.Properties;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
|
@ -45,6 +46,7 @@ import org.adempiere.webui.window.LoginWindow;
|
|||
import org.compiere.Adempiere;
|
||||
import org.compiere.model.MSession;
|
||||
import org.compiere.model.MUser;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
@ -87,6 +89,7 @@ public class LoginPanel extends Window implements EventListener
|
|||
private static final long serialVersionUID = 3992171368813030624L;
|
||||
private static final String RESOURCE = "org.compiere.apps.ALoginRes";
|
||||
private ResourceBundle res = ResourceBundle.getBundle(RESOURCE);
|
||||
private static CLogger logger = CLogger.getCLogger(LoginPanel.class);
|
||||
|
||||
private Properties ctx;
|
||||
private Label lblUserId;
|
||||
|
@ -202,6 +205,8 @@ public class LoginPanel extends Window implements EventListener
|
|||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
String[] data = (String[]) event.getData();
|
||||
try
|
||||
{
|
||||
int AD_Session_ID = Integer.parseInt(data[0]);
|
||||
MSession session = new MSession(Env.getCtx(), AD_Session_ID, null);
|
||||
if (session.get_ID() == AD_Session_ID)
|
||||
|
@ -222,6 +227,10 @@ public class LoginPanel extends Window implements EventListener
|
|||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
//safe to ignore
|
||||
logger.log(Level.INFO, e.getLocalizedMessage(), e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue