Fixed can't auto focus to number box.

This commit is contained in:
Heng Sin Low 2011-02-07 18:18:18 +08:00
parent b82586bb82
commit 72f706021a
1 changed files with 6 additions and 2 deletions

View File

@ -36,6 +36,7 @@ import org.adempiere.webui.component.EditorBox;
import org.adempiere.webui.component.Grid; import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.GridPanel; import org.adempiere.webui.component.GridPanel;
import org.adempiere.webui.component.Label; import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.NumberBox;
import org.adempiere.webui.component.Row; import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows; import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.SimpleTreeModel; import org.adempiere.webui.component.SimpleTreeModel;
@ -783,7 +784,10 @@ DataStatusListener, IADTabpanel, VetoableChangeListener
Component c = toFocus.getComponent(); Component c = toFocus.getComponent();
if (c instanceof EditorBox) { if (c instanceof EditorBox) {
c = ((EditorBox)c).getTextbox(); c = ((EditorBox)c).getTextbox();
} } else if (c instanceof NumberBox) {
c = ((NumberBox)c).getDecimalbox();
}
Clients.response(new AuFocus(c)); Clients.response(new AuFocus(c));
} }
} }
@ -1164,7 +1168,7 @@ DataStatusListener, IADTabpanel, VetoableChangeListener
} }
/** /**
* *
* @return GridPanel * @return GridPanel
*/ */
public GridPanel getGridView() { public GridPanel getGridView() {