use of org.compiere.model.MLookup in project adempiere by adempiere.
the class VTrxMaterial method dynParameter.
// jbInit
/**
* Initialize Parameter fields
* @throws Exception if Lookups cannot be initialized
*/
private void dynParameter() throws Exception {
Properties ctx = Env.getCtx();
// Organization
MLookup orgLookup = MLookupFactory.get(ctx, m_WindowNo, 0, 3660, DisplayType.TableDir);
orgField = new VLookup("AD_Org_ID", false, false, true, orgLookup);
// orgField.addVetoableChangeListener(this);
// Locator
MLocatorLookup locatorLookup = new MLocatorLookup(ctx, m_WindowNo);
locatorField = new VLocator("M_Locator_ID", false, false, true, locatorLookup, m_WindowNo);
// locatorField.addVetoableChangeListener(this);
// Product
MLookup productLookup = MLookupFactory.get(ctx, m_WindowNo, 0, 3668, DisplayType.Search);
productField = new VLookup("M_Product_ID", false, false, true, productLookup);
productField.addVetoableChangeListener(this);
// Movement Type
MLookup mtypeLookup = MLookupFactory.get(ctx, m_WindowNo, 0, 3666, DisplayType.List);
mtypeField = new VLookup("MovementType", false, false, true, mtypeLookup);
// Dates
dateFField = new VDate("DateFrom", false, false, true, DisplayType.Date, Msg.getMsg(Env.getCtx(), "DateFrom"));
dateTField = new VDate("DateTo", false, false, true, DisplayType.Date, Msg.getMsg(Env.getCtx(), "DateTo"));
//
confirmPanel.addActionListener(this);
statusBar.setStatusLine("");
}
use of org.compiere.model.MLookup in project adempiere by adempiere.
the class WCreateFromShipmentUI method initBPartner.
// vetoableChange
/**************************************************************************
* Load BPartner Field
* @param forInvoice true if Invoices are to be created, false receipts
* @throws Exception if Lookups cannot be initialized
*/
protected void initBPartner(boolean forInvoice) throws Exception {
// load BPartner
// C_Invoice.C_BPartner_ID
int AD_Column_ID = 3499;
MLookup lookup = MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, AD_Column_ID, DisplayType.Search);
bPartnerField = new WSearchEditor("C_BPartner_ID", true, false, true, lookup);
//
int C_BPartner_ID = getC_BPartner_ID();
bPartnerField.setValue(new Integer(C_BPartner_ID));
// initial loading
initBPOrderDetails(C_BPartner_ID, forInvoice);
}
use of org.compiere.model.MLookup in project adempiere by adempiere.
the class WAllocation method dynInit.
// jbInit
/**
* Dynamic Init (prepare dynamic fields)
* @throws Exception if Lookups cannot be initialized
*/
public void dynInit() throws Exception {
// Currency
// C_Invoice.C_Currency_ID
int AD_Column_ID = 3505;
MLookup lookupCur = MLookupFactory.get(Env.getCtx(), getWindowNo(), 0, AD_Column_ID, DisplayType.TableDir);
currencyPick = new WTableDirEditor("C_Currency_ID", true, false, true, lookupCur);
currencyPick.setValue(new Integer(m_C_Currency_ID));
currencyPick.addValueChangeListener(this);
// Organization filter selection
//C_Period.AD_Org_ID (needed to allow org 0)
AD_Column_ID = 839;
MLookup lookupOrg = MLookupFactory.get(Env.getCtx(), getWindowNo(), 0, AD_Column_ID, DisplayType.TableDir);
organizationPick = new WTableDirEditor("AD_Org_ID", true, false, true, lookupOrg);
organizationPick.setValue(Env.getAD_Org_ID(Env.getCtx()));
organizationPick.addValueChangeListener(this);
// BPartner
// C_Invoice.C_BPartner_ID
AD_Column_ID = 3499;
MLookup lookupBP = MLookupFactory.get(Env.getCtx(), getWindowNo(), 0, AD_Column_ID, DisplayType.Search);
bpartnerSearch = new WSearchEditor("C_BPartner_ID", true, false, true, lookupBP);
bpartnerSearch.addValueChangeListener(this);
// Translation
statusBar.setStatusLine(Msg.getMsg(Env.getCtx(), "AllocateStatus"));
statusBar.setStatusDB("");
// Date set to Login Date
dateField.setValue(Env.getContextAsDate(Env.getCtx(), "#Date"));
dateField.addValueChangeListener(this);
// C_AllocationLine.C_Charge_ID
AD_Column_ID = 61804;
MLookup lookupCharge = MLookupFactory.get(Env.getCtx(), getWindowNo(), 0, AD_Column_ID, DisplayType.TableDir);
chargePick = new WTableDirEditor("C_Charge_ID", true, false, true, lookupCharge);
chargePick.setValue(new Integer(m_C_Charge_ID));
chargePick.addValueChangeListener(this);
// APAR
// T_InvoiceGL.APAR
AD_Column_ID = 14082;
MLookup lookupAPAR = MLookupFactory.get(Env.getCtx(), getWindowNo(), 0, AD_Column_ID, DisplayType.List);
aparPick = new WTableDirEditor("APAR", true, false, true, lookupAPAR);
aparPick.setValue(APAR_A);
aparPick.addValueChangeListener(this);
}
use of org.compiere.model.MLookup in project adempiere by adempiere.
the class VCreateFromRMAUI method initBPartner.
// vetoableChange
/**************************************************************************
* Load BPartner Field
* @param forInvoice true if Invoices are to be created, false receipts
* @throws Exception if Lookups cannot be initialized
*/
protected void initBPartner(boolean forInvoice) throws Exception {
// load BPartner
// C_Invoice.C_BPartner_ID
int AD_Column_ID = 3499;
MLookup lookup = MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, AD_Column_ID, DisplayType.Search);
bPartnerField = new VLookup("C_BPartner_ID", true, false, true, lookup);
//
int C_BPartner_ID = getC_BPartner_ID();
bPartnerField.setValue(new Integer(C_BPartner_ID));
}
use of org.compiere.model.MLookup in project adempiere by adempiere.
the class WPayPrint method dynInit.
// VPayPrint
/**
* Dynamic Init
*/
private void dynInit() {
// C_PaySelection_ID
// C_PaySelectionCheck.C_PaySelection_ID
int AD_Column_ID = 7670;
// FR [ 297 ]
// Add DocStatus for validation
MLookupInfo info = MLookupFactory.getLookupInfo(Env.getCtx(), windowNo, AD_Column_ID, DisplayType.Search);
info.ValidationCode = "C_PaySelection.DocStatus IN('CO', 'CL') AND C_PaySelection.C_BankAccount_ID IS NOT NULL";
MLookup lookupPS = new MLookup(info, 0);
paySelectSearch = new WSearchEditor("C_PaySelection_ID", true, false, true, lookupPS);
paySelectSearch.addValueChangeListener(this);
}
Aggregations