use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WCreateFromInvoiceUI 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.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WOrderReceiptIssue 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 orderLookup = 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 WSearchEditor(MPPOrder.COLUMNNAME_PP_Order_ID, false, false, true, orderLookup);
orderField.addValueChangeListener(this);
MLookup resourceLookup = MLookupFactory.get(ctx, m_WindowNo, 0, MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_S_Resource_ID), DisplayType.TableDir);
resourceField = new WSearchEditor(MPPOrder.COLUMNNAME_S_Resource_ID, false, false, false, resourceLookup);
MLookup warehouseLookup = MLookupFactory.get(ctx, m_WindowNo, 0, MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_M_Warehouse_ID), DisplayType.TableDir);
warehouseField = new WSearchEditor(MPPOrder.COLUMNNAME_M_Warehouse_ID, false, false, false, warehouseLookup);
MLookup productLookup = MLookupFactory.get(ctx, m_WindowNo, 0, MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_M_Product_ID), DisplayType.TableDir);
productField = new WSearchEditor(MPPOrder.COLUMNNAME_M_Product_ID, false, false, false, productLookup);
MLookup uomLookup = MLookupFactory.get(ctx, m_WindowNo, 0, MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_C_UOM_ID), DisplayType.TableDir);
uomField = new WSearchEditor(MPPOrder.COLUMNNAME_C_UOM_ID, false, false, false, uomLookup);
MLookup uomOrderLookup = MLookupFactory.get(ctx, m_WindowNo, 0, MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_C_UOM_ID), DisplayType.TableDir);
uomorderField = new WSearchEditor(MPPOrder.COLUMNNAME_C_UOM_ID, false, false, false, uomOrderLookup);
MLocatorLookup locatorL = new MLocatorLookup(ctx, m_WindowNo);
locatorField = new WLocatorEditor(MLocator.COLUMNNAME_M_Locator_ID, true, false, true, locatorL, m_WindowNo);
// 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, "Manufacturing Order"), false, false, false);
vo.AD_Column_ID = MColumn.getColumn_ID(MPPOrder.Table_Name, MPPOrder.COLUMNNAME_M_AttributeSetInstance_ID);
vo.ColumnName = MPPOrder.COLUMNNAME_M_AttributeSetInstance_ID;
vo.displayType = DisplayType.PAttribute;
GridField field = new GridField(vo);
// M_AttributeSetInstance_ID
attribute = new WPAttributeEditor(field.getGridTab(), field);
attribute.setReadWrite(true);
attribute.setValue(0);
// 4Layers - Further init
scrapQtyField.setValue(Env.ZERO);
rejectQty.setValue(Env.ZERO);
// 4Layers - end
pickcombo.appendItem(Msg.parseTranslation(Env.getCtx(), "@IsBackflush@"), 1);
pickcombo.appendItem(Msg.parseTranslation(Env.getCtx(), "@OnlyIssue@"), 2);
pickcombo.appendItem(Msg.parseTranslation(Env.getCtx(), "@OnlyReceiptProduct@"), 3);
pickcombo.addEventListener(Events.ON_CHANGE, this);
Process.addActionListener(this);
toDeliverQty.addValueChangeListener(this);
scrapQtyField.addValueChangeListener(this);
}
use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WCreateFromStatementUI method dynInit.
/**
* Dynamic Init
* @throws Exception if Lookups cannot be initialized
* @return true if initialized
*/
public boolean dynInit() throws Exception {
log.config("");
//Refresh button
Button refreshButton = v_CreateFromPanel.getConfirmPanel().createButton(ConfirmPanel.A_REFRESH);
refreshButton.addEventListener(Events.ON_CLICK, this);
v_CreateFromPanel.getConfirmPanel().addButton(refreshButton);
// C_BankStatement.C_BankAccount_ID
int AD_Column_ID = 4917;
MLookup lookup = MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, AD_Column_ID, DisplayType.TableDir);
bankAccountField = new WTableDirEditor("C_BankAccount_ID", true, true, true, lookup);
// Set Default
bankAccountField.setValue(getC_BankAccount_ID());
// initial Loading
authorizationField = new WStringEditor("authorization", false, false, true, 10, 30, null, null);
authorizationField.getComponent().addEventListener(Events.ON_CHANGE, this);
lookup = MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPayment.Table_Name, MPayment.COLUMNNAME_C_DocType_ID), DisplayType.TableDir);
documentTypeField = new WTableDirEditor(MPayment.COLUMNNAME_C_DocType_ID, false, false, true, lookup);
documentTypeField.getComponent().addEventListener(Events.ON_CHANGE, this);
lookup = MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPayment.Table_Name, MPayment.COLUMNNAME_TenderType), DisplayType.List);
tenderTypeField = new WTableDirEditor(MPayment.COLUMNNAME_TenderType, false, false, true, lookup);
tenderTypeField.getComponent().addEventListener(Events.ON_CHANGE, this);
lookup = MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, 3499, DisplayType.Search);
bPartnerLookup = new WSearchEditor("C_BPartner_ID", false, false, true, lookup);
Timestamp date = Env.getContextAsDate(Env.getCtx(), p_WindowNo, MBankStatement.COLUMNNAME_StatementDate);
dateToField.setValue(date);
loadBankAccount();
return true;
}
use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WTrxMaterial 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 WTableDirEditor("AD_Org_ID", false, false, true, orgLookup);
// orgField.addVetoableChangeListener(this);
// Locator
MLocatorLookup locatorLookup = new MLocatorLookup(ctx, m_WindowNo);
locatorField = new WLocatorEditor("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 WSearchEditor("M_Product_ID", false, false, true, productLookup);
productField.addValueChangeListener(this);
// Movement Type
MLookup mtypeLookup = MLookupFactory.get(ctx, m_WindowNo, 0, 3666, DisplayType.List);
mtypeField = new WTableDirEditor("MovementType", false, false, true, mtypeLookup);
// Dates
dateFField = new WDateEditor("DateFrom", false, false, true, Msg.getMsg(Env.getCtx(), "DateFrom"));
dateTField = new WDateEditor("DateTo", false, false, true, Msg.getMsg(Env.getCtx(), "DateTo"));
//
confirmPanel.addActionListener(this);
statusBar.setStatusLine("");
}
use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WStocktake method dynParameter.
// jbInit
/**
* Initialize Parameter fields
* @throws Exception if Lookups cannot be initialized
*/
private void dynParameter() throws Exception {
Properties ctx = Env.getCtx();
// Physical Inventory
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 WTableDirEditor("M_Inventory_ID", false, false, true, inventoryLookup);
// Locator
MLocatorLookup locatorLookup = new MLocatorLookup(ctx, m_WindowNo);
locatorField = new WLocatorEditor("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 WSearchEditor("M_Product_ID", false, false, true, productLookup);
productField.addValueChangeListener(this);
// Aisle(X)
MLookup aislexLookup = MLookupFactory.get(ctx, m_WindowNo, 1399, DisplayType.Table, Env.getLanguage(Env.getCtx()), "X", 53562, false, null);
aislexField = new WTableDirEditor("X", false, false, true, aislexLookup);
// Dates
lineFField = new WNumberEditor();
lineTField = new WNumberEditor();
//
confirmPanel.addActionListener(this);
statusBar.setStatusLine("");
}
Aggregations