Search in sources :

Example 1 with VLocator

use of org.compiere.grid.ed.VLocator in project adempiere by adempiere.

the class VStocktake method dynParameter.

//  jbInit
/**
	 *  Initialize Parameter fields
	 *  @throws Exception if Lookups cannot be initialized
	 */
private void dynParameter() throws Exception {
    Properties ctx = Env.getCtx();
    //  Physical Inventory Document
    String vcode = "M_Inventory.IsStocktake='Y' ";
    MLookup inventoryLookup = MLookupFactory.get(ctx, m_WindowNo, 3563, DisplayType.TableDir, Env.getLanguage(Env.getCtx()), "M_Inventory_ID", 53249, true, vcode);
    inventoryField = new VLookup("M_Inventory_ID", false, false, true, inventoryLookup);
    //  Locator
    MLocatorLookup locatorLookup = new MLocatorLookup(ctx, m_WindowNo);
    locatorField = new VLocator("M_Locator_ID", false, false, true, locatorLookup, m_WindowNo);
    //  Product
    MLookup productLookup = MLookupFactory.get(ctx, m_WindowNo, 0, 3668, DisplayType.Search);
    productField = new VLookup("M_Product_ID", false, false, true, productLookup);
    //  Aisle(X)
    MLookup aislexLookup = MLookupFactory.get(ctx, m_WindowNo, 1399, DisplayType.Table, Env.getLanguage(Env.getCtx()), "X", 53562, false, null);
    aislexField = new VLookup("X", false, false, true, aislexLookup);
    //  lines
    lineFField = new VNumber();
    lineTField = new VNumber();
    //
    confirmPanel.addActionListener(this);
    statusBar.setStatusLine("");
}
Also used : MLocatorLookup(org.compiere.model.MLocatorLookup) MLookup(org.compiere.model.MLookup) VLookup(org.compiere.grid.ed.VLookup) VLocator(org.compiere.grid.ed.VLocator) VNumber(org.compiere.grid.ed.VNumber) Properties(java.util.Properties)

Example 2 with VLocator

use of org.compiere.grid.ed.VLocator in project adempiere by adempiere.

the class VCreateFromShipmentUI method dynInit.

/**
	 *  Dynamic Init
	 *  @throws Exception if Lookups cannot be initialized
	 *  @return true if initialized
	 */
public boolean dynInit() throws Exception {
    log.config("");
    //  load Locator
    MLocatorLookup locator = new MLocatorLookup(Env.getCtx(), p_WindowNo);
    locatorField = new VLocator("M_Locator_ID", true, false, true, locator, p_WindowNo);
    sameWarehouseCb.setSelected(true);
    sameWarehouseCb.addActionListener(this);
    initBPartner(false);
    bPartnerField.addVetoableChangeListener(this);
    return true;
}
Also used : MLocatorLookup(org.compiere.model.MLocatorLookup) VLocator(org.compiere.grid.ed.VLocator)

Example 3 with VLocator

use of org.compiere.grid.ed.VLocator 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 4 with VLocator

use of org.compiere.grid.ed.VLocator in project adempiere by adempiere.

the class VOrderReceiptIssue method fillPicks.

// init
/**
	 * Fill Picks Column_ID from C_Order This is only run as part of the windows
	 * initialization process
	 * 
	 * @throws Exception
	 *             if Lookups cannot be initialized
	 */
private void fillPicks() throws Exception {
    Properties ctx = Env.getCtx();
    // Base Language
    Language language = Language.getLoginLanguage();
    MLookup orderL = MLookupFactory.get(ctx, m_WindowNo, MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_PP_Order_ID), DisplayType.Search, language, "PP_Order_ID", 0, false, "PP_Order.DocStatus = '" + MPPOrder.DOCACTION_Complete + "'");
    orderField = new VLookup("PP_Order_ID", false, false, true, orderL);
    orderField.setBackground(AdempierePLAF.getInfoBackground());
    orderField.addVetoableChangeListener(this);
    MLookup resourceL = MLookupFactory.get(ctx, m_WindowNo, 0, MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_S_Resource_ID), DisplayType.TableDir);
    resourceField = new VLookup("S_Resource_ID", false, false, false, resourceL);
    MLookup warehouseL = MLookupFactory.get(ctx, m_WindowNo, 0, MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_M_Warehouse_ID), DisplayType.TableDir);
    warehouseField = new VLookup("M_Warehouse_ID", false, false, false, warehouseL);
    MLookup productL = MLookupFactory.get(ctx, m_WindowNo, 0, MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_M_Product_ID), DisplayType.TableDir);
    productField = new VLookup("M_Product_ID", false, false, false, productL);
    MLookup uomL = MLookupFactory.get(ctx, m_WindowNo, 0, MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_C_UOM_ID), DisplayType.TableDir);
    uomField = new VLookup("C_UOM_ID", false, false, false, uomL);
    MLookup uomorderL = MLookupFactory.get(ctx, m_WindowNo, 0, MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_C_UOM_ID), DisplayType.TableDir);
    uomorderField = new VLookup("C_UOM_ID", false, false, false, uomorderL);
    MLocatorLookup locatorL = new MLocatorLookup(ctx, m_WindowNo);
    locatorField = new VLocator("M_Locator_ID", true, false, true, locatorL, m_WindowNo);
    MPAttributeLookup attributeL = new MPAttributeLookup(ctx, m_WindowNo);
    attribute = new VPAttribute(false, false, true, m_WindowNo, attributeL, false);
    attribute.setValue(0);
    // Tab, Window
    int m_Window = MWindow.getWindow_ID("Manufacturing Order");
    GridFieldVO vo = GridFieldVO.createStdField(ctx, m_WindowNo, 0, m_Window, MTab.getTab_ID(m_Window, "Order"), false, false, false);
    // M_AttributeSetInstance_ID
    vo.AD_Column_ID = MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_M_AttributeSetInstance_ID);
    GridField field = new GridField(vo);
    attribute.setField(field);
    // 4Layers - Further init
    scrapQtyField.setValue(Env.ZERO);
    rejectQty.setValue(Env.ZERO);
    // 4Layers - end
    pickcombo.addItem(new KeyNamePair(1, Msg.parseTranslation(Env.getCtx(), "@IsBackflush@")));
    pickcombo.addItem(new KeyNamePair(2, Msg.parseTranslation(Env.getCtx(), "@OnlyIssue@")));
    pickcombo.addItem(new KeyNamePair(3, Msg.parseTranslation(Env.getCtx(), "@OnlyReceiptProduct@")));
    pickcombo.addActionListener(this);
    Process.addActionListener(this);
    toDeliverQty.addActionListener(this);
    scrapQtyField.addActionListener(this);
}
Also used : MLocatorLookup(org.compiere.model.MLocatorLookup) VPAttribute(org.compiere.grid.ed.VPAttribute) Language(org.compiere.util.Language) GridFieldVO(org.compiere.model.GridFieldVO) MLookup(org.compiere.model.MLookup) VLookup(org.compiere.grid.ed.VLookup) VLocator(org.compiere.grid.ed.VLocator) GridField(org.compiere.model.GridField) KeyNamePair(org.compiere.util.KeyNamePair) Properties(java.util.Properties) MPAttributeLookup(org.compiere.model.MPAttributeLookup)

Aggregations

VLocator (org.compiere.grid.ed.VLocator)4 MLocatorLookup (org.compiere.model.MLocatorLookup)4 Properties (java.util.Properties)3 VLookup (org.compiere.grid.ed.VLookup)3 MLookup (org.compiere.model.MLookup)3 VDate (org.compiere.grid.ed.VDate)1 VNumber (org.compiere.grid.ed.VNumber)1 VPAttribute (org.compiere.grid.ed.VPAttribute)1 GridField (org.compiere.model.GridField)1 GridFieldVO (org.compiere.model.GridFieldVO)1 MPAttributeLookup (org.compiere.model.MPAttributeLookup)1 KeyNamePair (org.compiere.util.KeyNamePair)1 Language (org.compiere.util.Language)1