* bug: alias always mandatory.

This commit is contained in:
Heng Sin Low 2008-07-11 07:48:26 +00:00
parent 08e767da24
commit 9b8f2ac877
2 changed files with 18 additions and 1 deletions

View File

@ -17,6 +17,7 @@
package org.adempiere.webui.editor;
import java.beans.PropertyChangeEvent;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
@ -211,6 +212,22 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
}
@Override
public void propertyChange(PropertyChangeEvent evt)
{
if ("FieldValue".equals(evt.getPropertyName()))
{
if ( evt.getNewValue()== null)
{
actionRefresh("");
}
else
{
actionRefresh(evt.getNewValue());
}
}
}
private void actionRefresh(Object value)
{
boolean mandatory = isMandatory();

View File

@ -707,7 +707,7 @@ public final class WAccountDialog extends Window
if (s_AcctSchema.isHasAlias())
{
value = f_Alias.getValue().toString();
if (isEmpty(value))
if (isEmpty(value) && f_Alias.isMandatory())
sb.append(Msg.translate(Env.getCtx(), "Alias")).append(", ");
}
MAcctSchemaElement[] elements = s_AcctSchema.getAcctSchemaElements();