Search in sources :

Example 21 with MLookup

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("");
}
Also used : MLocatorLookup(org.compiere.model.MLocatorLookup) MLookup(org.compiere.model.MLookup) VLookup(org.compiere.grid.ed.VLookup) VDate(org.compiere.grid.ed.VDate) VLocator(org.compiere.grid.ed.VLocator) Properties(java.util.Properties)

Example 22 with MLookup

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);
}
Also used : MLookup(org.compiere.model.MLookup) WSearchEditor(org.adempiere.webui.editor.WSearchEditor)

Example 23 with MLookup

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);
}
Also used : WTableDirEditor(org.adempiere.webui.editor.WTableDirEditor) MLookup(org.compiere.model.MLookup) WSearchEditor(org.adempiere.webui.editor.WSearchEditor)

Example 24 with MLookup

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));
}
Also used : MLookup(org.compiere.model.MLookup) VLookup(org.compiere.grid.ed.VLookup)

Example 25 with MLookup

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);
}
Also used : MLookupInfo(org.compiere.model.MLookupInfo) MLookup(org.compiere.model.MLookup) WSearchEditor(org.adempiere.webui.editor.WSearchEditor) PayPrint(org.compiere.apps.form.PayPrint)

Aggregations

MLookup (org.compiere.model.MLookup)62 VLookup (org.compiere.grid.ed.VLookup)25 WSearchEditor (org.adempiere.webui.editor.WSearchEditor)17 Properties (java.util.Properties)14 SQLException (java.sql.SQLException)9 WTableDirEditor (org.adempiere.webui.editor.WTableDirEditor)9 KeyNamePair (org.compiere.util.KeyNamePair)9 Language (org.compiere.util.Language)7 MLocatorLookup (org.compiere.model.MLocatorLookup)6 PreparedStatement (java.sql.PreparedStatement)5 ResultSet (java.sql.ResultSet)5 Dimension (java.awt.Dimension)4 Insets (java.awt.Insets)4 BigDecimal (java.math.BigDecimal)4 Row (org.adempiere.webui.component.Row)4 Rows (org.adempiere.webui.component.Rows)4 GridField (org.compiere.model.GridField)4 MColumn (org.compiere.model.MColumn)4 CPanel (org.compiere.swing.CPanel)4 GridBagConstraints (java.awt.GridBagConstraints)3