use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class InfoOrderPanel method initComponents.
public void initComponents() {
lblDocumentNo = new Label(Util.cleanAmp(Msg.translate(Env.getCtx(), "DocumentNo")));
lblDescription = new Label(Msg.translate(Env.getCtx(), "Description"));
lblDateOrdered = new Label(Msg.translate(Env.getCtx(), "DateOrdered"));
lblOrderRef = new Label(Msg.translate(Env.getCtx(), "POReference"));
lblGrandTotal = new Label(Msg.translate(Env.getCtx(), "GrandTotal"));
fDocumentNo = new Textbox();
fDocumentNo.addEventListener(Events.ON_CHANGE, this);
fDocumentNo.setAttribute("zk_component_ID", "Lookup_Criteria_DocumentNo");
fDescription = new Textbox();
fDescription.addEventListener(Events.ON_CHANGE, this);
fDescription.setAttribute("zk_component_ID", "Lookup_Criteria_Description");
fPOReference = new Textbox();
fPOReference.addEventListener(Events.ON_CHANGE, this);
fPOReference.setAttribute("zk_component_ID", "Lookup_Criteria_POReference");
// Format the dates and number boxes
fDateFrom = new Datebox();
fDateFrom.setWidth("97px");
fDateFrom.setAttribute("zk_component_ID", "Lookup_Criteria_DateFrom");
fDateFrom.addEventListener(Events.ON_CHANGE, this);
//
fDateTo = new Datebox();
fDateTo.setWidth("97px");
fDateTo.setAttribute("zk_component_ID", "Lookup_Criteria_DateTo");
fDateTo.addEventListener(Events.ON_CHANGE, this);
//
SimpleDateFormat dateFormat = DisplayType.getDateFormat(DisplayType.Date, AEnv.getLanguage(Env.getCtx()));
fDateFrom.setFormat(dateFormat.toPattern());
fDateTo.setFormat(dateFormat.toPattern());
//
fAmtFrom = new NumberBox(false);
fAmtFrom.getDecimalbox().setWidth("90px");
fAmtFrom.setAttribute("zk_component_ID", "Lookup_Criteria_AmtFrom");
fAmtFrom.addEventListener(Events.ON_CHANGE, this);
//
fAmtTo = new NumberBox(false);
fAmtTo.getDecimalbox().setWidth("90px");
fAmtTo.setAttribute("zk_component_ID", "Lookup_Criteria_AmtTo");
fAmtTo.addEventListener(Events.ON_CHANGE, this);
//
DecimalFormat format = DisplayType.getNumberFormat(DisplayType.Amount, AEnv.getLanguage(Env.getCtx()));
fAmtFrom.getDecimalbox().setFormat(format.toPattern());
fAmtFrom.getDecimalbox().setStyle("text-align:right; " + fAmtFrom.getDecimalbox().getStyle());
fAmtTo.getDecimalbox().setFormat(format.toPattern());
fAmtTo.getDecimalbox().setStyle("text-align:right; " + fAmtTo.getDecimalbox().getStyle());
//
fIsSOTrx = new Checkbox();
fIsSOTrx.setLabel(Msg.translate(Env.getCtx(), "IsSOTrx"));
fIsSOTrx.setName("IsSOTrx");
fIsSOTrx.setAttribute("zk_component_ID", "Lookup_Criteria_IsSoTrx");
fIsSOTrx.setAttribute("IsDynamic", "True");
fIsSOTrx.addActionListener(this);
fIsDelivered = new Checkbox();
fIsDelivered.setLabel(Msg.translate(Env.getCtx(), "IsDelivered"));
fIsDelivered.setName("IsDelivered");
fIsDelivered.setAttribute("zk_component_ID", "Lookup_Criteria_IsDelivered");
fIsDelivered.addActionListener(this);
fBPartner_ID = new WSearchEditor(MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MOrder.Table_Name, MOrder.COLUMNNAME_C_BPartner_ID), DisplayType.Search), Msg.translate(Env.getCtx(), "C_BPartner_ID"), "", false, false, true);
fBPartner_ID.getComponent().setAttribute("zk_component_ID", "Lookup_Criteria_C_BPartner_ID");
fBPartner_ID.addValueChangeListener(this);
}
use of org.adempiere.webui.editor.WSearchEditor 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.adempiere.webui.editor.WSearchEditor 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.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WTreeBOM method preInit.
// dynInit
private void preInit() throws Exception {
Properties ctx = getCtx();
// Base Language
Language language = Language.getLoginLanguage();
MLookup m_fieldProduct = MLookupFactory.get(ctx, m_WindowNo, MColumn.getColumn_ID(MProduct.Table_Name, "M_Product_ID"), DisplayType.Search, language, MProduct.COLUMNNAME_M_Product_ID, 0, false, " M_Product.IsSummary = 'N'");
fieldProduct = new WSearchEditor("M_Product_ID", true, false, true, m_fieldProduct) {
public void setValue(Object value) {
super.setValue(value);
action_loadBOM();
}
};
implosion.addActionListener(this);
}
use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WCRPDetail method fillPicks.
private void fillPicks() {
Properties ctx = Env.getCtx();
// Hardcoded Column ID - Manufacturing Resource ID
MLookup resourceL = MLookupFactory.get(ctx, 0, 0, MColumn.getColumn_ID(I_S_Resource.Table_Name, "S_Resource_ID"), DisplayType.TableDir);
resource = new WSearchEditor("S_Resource_ID", false, false, true, resourceL);
}
Aggregations