use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WPaySelect method valueChange.
/**
* Capture value changes in WSearchEditor components specifically.
* Copy and override as required.
* @param evt
*/
public void valueChange(ValueChangeEvent evt) {
Object c = null;
if (evt.getSource() instanceof WSearchEditor)
c = ((WSearchEditor) evt.getSource()).getComponent();
else if (evt.getSource() instanceof WPAttributeEditor)
c = ((WPAttributeEditor) evt.getSource()).getComponent();
else if (evt.getSource() instanceof WDateEditor)
c = ((WDateEditor) evt.getSource()).getComponent();
if (c == null)
return;
// Pass it off to the event handler to process.
Event e = new Event("onChange", (Component) c);
onEvent(e);
}
use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WMerge method preInit.
// preInit
/**
* Pre Init Line
* @param index index
* @param AD_Column_ID id
* @param displayType display type
* @param ColumnName column name
*/
private void preInit(int index, int AD_Column_ID, int displayType, String ColumnName) {
m_columnName[index] = ColumnName;
String what = Msg.translate(Env.getCtx(), ColumnName);
m_label[index] = new Label(what);
Lookup lookup = MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, AD_Column_ID, displayType);
if (displayType == DisplayType.Search) {
m_from[index] = new WSearchEditor(ColumnName, false, false, true, lookup);
m_to[index] = new WSearchEditor(ColumnName, false, false, true, lookup);
} else {
m_from[index] = new WTableDirEditor(ColumnName, false, false, true, lookup);
m_to[index] = new WTableDirEditor(ColumnName, false, false, true, lookup);
}
}
use of org.adempiere.webui.editor.WSearchEditor 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);
}
use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WInvoiceGen method dynInit.
// jbInit
/**
* Fill Picks.
* Column_ID from C_Order
* @throws Exception if Lookups cannot be initialized
*/
public void dynInit() throws Exception {
MLookup orgL = MLookupFactory.get(Env.getCtx(), form.getWindowNo(), 0, 2163, DisplayType.TableDir);
fOrg = new WTableDirEditor("AD_Org_ID", false, false, true, orgL);
// lOrg.setText(Msg.translate(Env.getCtx(), "AD_Org_ID"));
fOrg.addValueChangeListener(this);
//
MLookup bpL = MLookupFactory.get(Env.getCtx(), form.getWindowNo(), 0, 2762, DisplayType.Search);
fBPartner = new WSearchEditor("C_BPartner_ID", false, false, true, bpL);
// lBPartner.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
fBPartner.addValueChangeListener(this);
// Document Action Prepared/ Completed
lDocAction.setText(Msg.translate(Env.getCtx(), "DocAction"));
MLookup docActionL = MLookupFactory.get(Env.getCtx(), form.getWindowNo(), 3495, /* C_Invoice.DocAction */
DisplayType.List, Env.getLanguage(Env.getCtx()), "DocAction", 135, /* _Document Action */
false, "AD_Ref_List.Value IN ('CO','PR')");
docAction = new WTableDirEditor("DocAction", true, false, true, docActionL);
docAction.setValue(DocAction.ACTION_Complete);
docAction.addValueChangeListener(this);
// Document Type Sales Order/Vendor RMA
lDocType.setText(Msg.translate(Env.getCtx(), "C_DocType_ID"));
cmbDocType.addItem(new KeyNamePair(MOrder.Table_ID, Msg.translate(Env.getCtx(), "Order")));
cmbDocType.addItem(new KeyNamePair(MRMA.Table_ID, Msg.translate(Env.getCtx(), "CustomerRMA")));
cmbDocType.addActionListener(this);
cmbDocType.setSelectedIndex(0);
//@@
form.getStatusBar().setStatusLine(Msg.getMsg(Env.getCtx(), "InvGenerateSel"));
}
use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WInOutGen method dynInit.
// jbInit
/**
* Fill Picks.
* Column_ID from C_Order
* @throws Exception if Lookups cannot be initialized
*/
public void dynInit() throws Exception {
// C_OrderLine.M_Warehouse_ID
MLookup orgL = MLookupFactory.get(Env.getCtx(), form.getWindowNo(), 0, 2223, DisplayType.TableDir);
fWarehouse = new WTableDirEditor("M_Warehouse_ID", true, false, true, orgL);
lWarehouse.setText(Msg.translate(Env.getCtx(), "M_Warehouse_ID"));
fWarehouse.addValueChangeListener(this);
fWarehouse.setValue(Env.getContextAsInt(Env.getCtx(), "#M_Warehouse_ID"));
setM_Warehouse_ID(fWarehouse.getValue());
// Document Action Prepared/ Completed
lDocAction.setText(Msg.translate(Env.getCtx(), "DocAction"));
MLookup docActionL = MLookupFactory.get(Env.getCtx(), form.getWindowNo(), 4324, /* M_InOut.DocAction */
DisplayType.List, Env.getLanguage(Env.getCtx()), "DocAction", 135, /* _Document Action */
false, "AD_Ref_List.Value IN ('CO','PR')");
docAction = new WTableDirEditor("DocAction", true, false, true, docActionL);
docAction.setValue(DocAction.ACTION_Complete);
docAction.addValueChangeListener(this);
// C_Order.C_BPartner_ID
MLookup bpL = MLookupFactory.get(Env.getCtx(), form.getWindowNo(), 0, 2762, DisplayType.Search);
fBPartner = new WSearchEditor("C_BPartner_ID", false, false, true, bpL);
lBPartner.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
fBPartner.addValueChangeListener(this);
//Document Type Sales Order/Vendor RMA
lDocType.setText(Msg.translate(Env.getCtx(), "C_DocType_ID"));
cmbDocType.addItem(new KeyNamePair(MOrder.Table_ID, Msg.translate(Env.getCtx(), "Order")));
cmbDocType.addItem(new KeyNamePair(MRMA.Table_ID, Msg.translate(Env.getCtx(), "VendorRMA")));
cmbDocType.addActionListener(this);
cmbDocType.setSelectedIndex(0);
//@@
form.getStatusBar().setStatusLine(Msg.getMsg(Env.getCtx(), "InOutGenerateSel"));
}
Aggregations