* Merge revisions 6398 from branches/adempiere341
This commit is contained in:
parent
cb40da8cc6
commit
a67d22109e
|
@ -63,6 +63,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
||||||
private String columnName;
|
private String columnName;
|
||||||
private WEditorPopupMenu popupMenu;
|
private WEditorPopupMenu popupMenu;
|
||||||
private Object value;
|
private Object value;
|
||||||
|
private InfoPanel infoPanel = null;
|
||||||
|
|
||||||
private static CLogger log = CLogger.getCLogger(WSearchEditor.class);
|
private static CLogger log = CLogger.getCLogger(WSearchEditor.class);
|
||||||
|
|
||||||
|
@ -269,6 +270,11 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
||||||
}
|
}
|
||||||
else if (WEditorPopupMenu.NEW_EVENT.equals(evt.getContextEvent()))
|
else if (WEditorPopupMenu.NEW_EVENT.equals(evt.getContextEvent()))
|
||||||
{
|
{
|
||||||
|
if (infoPanel != null)
|
||||||
|
{
|
||||||
|
infoPanel.detach();
|
||||||
|
infoPanel = null;
|
||||||
|
}
|
||||||
actionBPartner(true);
|
actionBPartner(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -477,6 +483,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
||||||
ip.setClosable(true);
|
ip.setClosable(true);
|
||||||
ip.setAttribute("mode", "modal");
|
ip.setAttribute("mode", "modal");
|
||||||
ip.addValueChangeListener(this);
|
ip.addValueChangeListener(this);
|
||||||
|
infoPanel = ip;
|
||||||
AEnv.showWindow(ip);
|
AEnv.showWindow(ip);
|
||||||
}
|
}
|
||||||
else if (col.equals("C_BPartner_ID"))
|
else if (col.equals("C_BPartner_ID"))
|
||||||
|
@ -498,6 +505,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
||||||
ip.setClosable(true);
|
ip.setClosable(true);
|
||||||
ip.setAttribute("mode", "modal");
|
ip.setAttribute("mode", "modal");
|
||||||
ip.addValueChangeListener(this);
|
ip.addValueChangeListener(this);
|
||||||
|
infoPanel = ip;
|
||||||
AEnv.showWindow(ip);
|
AEnv.showWindow(ip);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -524,6 +532,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
||||||
ig.setClosable(true);
|
ig.setClosable(true);
|
||||||
ig.setAttribute("mode", "modal");
|
ig.setAttribute("mode", "modal");
|
||||||
ig.addValueChangeListener(this);
|
ig.addValueChangeListener(this);
|
||||||
|
infoPanel = ig;
|
||||||
AEnv.showWindow(ig);
|
AEnv.showWindow(ig);
|
||||||
|
|
||||||
cancelled = ig.isCancelled();
|
cancelled = ig.isCancelled();
|
||||||
|
@ -531,6 +540,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
infoPanel = null;
|
||||||
// Result
|
// Result
|
||||||
if (result != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -168,6 +168,8 @@ ContextMenuListener, IZoomableEditor
|
||||||
if (selItem != null)
|
if (selItem != null)
|
||||||
{
|
{
|
||||||
retVal = selItem.getValue();
|
retVal = selItem.getValue();
|
||||||
|
if ((retVal instanceof Integer) && (Integer)retVal == -1)
|
||||||
|
retVal = null;
|
||||||
}
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@ import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
|
import org.zkoss.zk.ui.WrongValueException;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zk.ui.event.Events;
|
import org.zkoss.zk.ui.event.Events;
|
||||||
|
@ -379,19 +380,13 @@ public class WBPartner extends Window implements EventListener, ValueChangeListe
|
||||||
// Check Mandatory fields
|
// Check Mandatory fields
|
||||||
if (fName.getText().equals(""))
|
if (fName.getText().equals(""))
|
||||||
{
|
{
|
||||||
fName.setStyle(BackgroundColours.ERROR);
|
throw new WrongValueException(fName, Msg.translate(Env.getCtx(), "FillMandatory"));
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
fName.setStyle(BackgroundColours.MANDATORY);
|
|
||||||
|
|
||||||
if (fAddress.getC_Location_ID() == 0)
|
if (fAddress.getC_Location_ID() == 0)
|
||||||
{
|
{
|
||||||
//fAddress.setBackground(Color)(BackgroundColours.ERROR);
|
throw new WrongValueException(fAddress.getComponent(), Msg.translate(Env.getCtx(), "FillMandatory"));
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
//else
|
|
||||||
//fAddress.setBackground(AdempierePLAF.getFieldBackground_Mandatory());
|
|
||||||
|
|
||||||
// ***** Business Partner *****
|
// ***** Business Partner *****
|
||||||
|
|
||||||
|
@ -421,7 +416,7 @@ public class WBPartner extends Window implements EventListener, ValueChangeListe
|
||||||
m_partner.setName2(fName2.getText());
|
m_partner.setName2(fName2.getText());
|
||||||
|
|
||||||
ListItem listitem = fGreetingBP.getSelectedItem();
|
ListItem listitem = fGreetingBP.getSelectedItem();
|
||||||
KeyNamePair p = (KeyNamePair)listitem.getValue();
|
KeyNamePair p = listitem != null ? (KeyNamePair)listitem.getValue() : null;
|
||||||
|
|
||||||
if (p != null && p.getKey() > 0)
|
if (p != null && p.getKey() > 0)
|
||||||
m_partner.setC_Greeting_ID(p.getKey());
|
m_partner.setC_Greeting_ID(p.getKey());
|
||||||
|
@ -467,7 +462,7 @@ public class WBPartner extends Window implements EventListener, ValueChangeListe
|
||||||
m_user.setTitle(fTitle.getText());
|
m_user.setTitle(fTitle.getText());
|
||||||
|
|
||||||
listitem = fGreetingC.getSelectedItem();
|
listitem = fGreetingC.getSelectedItem();
|
||||||
p = (KeyNamePair)listitem.getValue();
|
p = listitem != null ? (KeyNamePair)listitem.getValue() : null;
|
||||||
|
|
||||||
if (p != null && p.getKey() > 0)
|
if (p != null && p.getKey() > 0)
|
||||||
m_user.setC_Greeting_ID(p.getKey());
|
m_user.setC_Greeting_ID(p.getKey());
|
||||||
|
|
Loading…
Reference in New Issue