use of org.adempiere.webui.editor.WLocationEditor in project adempiere by adempiere.
the class WPOSBPartner method initBPartner.
/**
* Dynamic Init
*/
private void initBPartner() {
// Value
fValue.addEventListener(this);
fValue.setWidth("97%");
fValue.setStyle(WPOS.FONTSIZESMALL);
createLine(fValue, "Value", true);
// Name
fName.addEventListener(this);
fName.setWidth("97%");
fName.setStyle(WPOS.FONTSIZESMALL);
createLine(fName, "Name", false);
// Name2
fName2.addEventListener(this);
fName2.setWidth("97%");
fName2.setStyle(WPOS.FONTSIZESMALL);
createLine(fName2, "Name2", false);
// Contact
fContact.addEventListener(this);
fContact.setWidth("97%");
fContact.setStyle(WPOS.FONTSIZESMALL);
createLine(fContact, "Contact", true);
// Email
fEMail.addEventListener(this);
fEMail.setWidth("97%");
fEMail.setStyle(WPOS.FONTSIZESMALL);
createLine(fEMail, "EMail", false);
// Location
boolean ro = m_readOnly;
if (!ro)
ro = !MRole.getDefault().canUpdate(Env.getAD_Client_ID(Env.getCtx()), Env.getAD_Org_ID(Env.getCtx()), MBPartnerLocation.Table_ID, 0, false);
if (!ro)
ro = !MRole.getDefault().canUpdate(Env.getAD_Client_ID(Env.getCtx()), Env.getAD_Org_ID(Env.getCtx()), MLocation.Table_ID, 0, false);
fAddress = new WLocationEditor("C_Location_ID", false, ro, true, new MLocationLookup(Env.getCtx(), m_WindowNo));
fAddress.addValueChangeListener(this);
fAddress.setValue(null);
createLine(fAddress.getComponent(), "C_Location_ID", true);
// Phone
fPhone.addEventListener(this);
fPhone.setWidth("97%");
fPhone.setStyle(WPOS.FONTSIZESMALL);
createLine(fPhone, "Phone", true);
// Phone2
fPhone2.addEventListener(this);
fPhone2.setWidth("97%");
fPhone2.setStyle(WPOS.FONTSIZESMALL);
createLine(fPhone2, "Phone2", false);
}
use of org.adempiere.webui.editor.WLocationEditor in project adempiere by adempiere.
the class WBPartner method initBPartner.
/**
* Dynamic Init
*/
private void initBPartner() {
// Get Data
m_greeting = fillGreeting();
// Value
fValue.addEventListener(Events.ON_CHANGE, this);
createLine(fValue, "Value", true);
// Greeting Business Partner
fGreetingBP.setMold("select");
fGreetingBP.setRows(0);
for (int i = 0; i < m_greeting.length; i++) fGreetingBP.appendItem(m_greeting[i].toString(), m_greeting[i]);
createLine(fGreetingBP, "Greeting", false);
// Name
fName.addEventListener(Events.ON_CLICK, this);
createLine(fName, "Name", false);
// Name2
createLine(fName2, "Name2", false);
// TaxId
createLine(fTaxId, "TaxID", false);
// Contact
createLine(fContact, "Contact", true);
// Greeting Contact
fGreetingC.setMold("select");
fGreetingC.setRows(0);
for (int i = 0; i < m_greeting.length; i++) fGreetingC.appendItem(m_greeting[i].toString(), m_greeting[i]);
createLine(fGreetingC, "Greeting", false);
// Title
createLine(fTitle, "Title", false);
// Email
createLine(fEMail, "EMail", false);
// Location
boolean ro = m_readOnly;
if (!ro)
ro = !MRole.getDefault().canUpdate(Env.getAD_Client_ID(Env.getCtx()), Env.getAD_Org_ID(Env.getCtx()), MBPartnerLocation.Table_ID, 0, false);
if (!ro)
ro = !MRole.getDefault().canUpdate(Env.getAD_Client_ID(Env.getCtx()), Env.getAD_Org_ID(Env.getCtx()), MLocation.Table_ID, 0, false);
fAddress = new WLocationEditor("C_Location_ID", false, ro, true, new MLocationLookup(Env.getCtx(), m_WindowNo));
fAddress.addValueChangeListener(this);
fAddress.setValue(null);
createLine(fAddress.getComponent(), "C_Location_ID", true);
// Phone
createLine(fPhone, "Phone", true);
// Phone2
createLine(fPhone2, "Phone2", false);
// Fax
createLine(fFax, "Fax", false);
}
Aggregations