IDEMPIERE-841 The Look up Account in the account dialog doesn’t work correctly.

This commit is contained in:
Heng Sin Low 2013-04-26 20:58:20 +08:00
parent ae0f5da4ad
commit 1490253871
1 changed files with 12 additions and 0 deletions

View File

@ -36,6 +36,7 @@ import org.adempiere.webui.event.WTableModelEvent;
import org.adempiere.webui.window.FDialog;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.I_C_ElementValue;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@ -119,6 +120,17 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener<Event>
if (queryValue != null && queryValue.length() > 0)
{
String separator = I_C_ElementValue.Table_Name.equalsIgnoreCase(p_tableName) ? "-" : "_";
if (txt2.isVisible())
{
String[] values = queryValue.split("["+separator+"]");
if (values != null && values.length == 2)
{
txt1.setValue(values[0]);
txt2.setValue(values[1]);
}
}
executeQuery();
renderItems();
}