BF [ 2564070 ] Saving user queries can produce unnecessary db errors

https://sourceforge.net/tracker/index.php?func=detail&aid=2564070&group_id=176962&atid=879332
This commit is contained in:
teo_sarca 2009-02-04 14:04:41 +00:00
parent be02c3cf53
commit 7f28991e8a
1 changed files with 9 additions and 0 deletions

View File

@ -95,6 +95,7 @@ import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.compiere.util.ValueNamePair;
/**
@ -103,6 +104,9 @@ import org.compiere.util.ValueNamePair;
*
* @author Jorg Janke
* @version $Id: Find.java,v 1.3 2006/07/30 00:51:27 jjanke Exp $
*
* @author Teo Sarca, www.arhipac.ro
* <li>BF [ 2564070 ] Saving user queries can produce unnecessary db errors
*/
public final class Find extends CDialog
implements ActionListener, ChangeListener, DataStatusListener
@ -1064,6 +1068,11 @@ public final class Find extends CDialog
Object selected = fQueryName.getSelectedItem();
if (selected != null && saveQuery) {
String name = selected.toString();
if (Util.isEmpty(name, true))
{
ADialog.warn(m_targetWindowNo, this, "FillMandatory", Msg.translate(Env.getCtx(), "Name"));
return;
}
MUserQuery uq = MUserQuery.get(Env.getCtx(), m_AD_Tab_ID, name);
if (uq == null && code.length() > 0)
{