use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WMRPDetailed method statInit.
private void statInit() throws Exception {
//Resource Lookup
// Base Language
Language language = Language.getLoginLanguage();
MLookup resourceL = MLookupFactory.get(getCtx(), p_WindowNo, MColumn.getColumn_ID(MResource.Table_Name, MResource.COLUMNNAME_S_Resource_ID), DisplayType.TableDir, language, MResource.COLUMNNAME_S_Resource_ID, 0, false, MResource.Table_Name + "." + MResource.COLUMNNAME_ManufacturingResourceType + "= '" + MResource.MANUFACTURINGRESOURCETYPE_Plant + "'");
fResource_ID = new WSearchEditor(MPPMRP.COLUMNNAME_S_Resource_ID, false, false, true, resourceL) {
private final long serialVersionUID = 1L;
public void setValue(Object arg0) {
super.setValue(arg0);
}
;
};
fPlanner_ID = new WSearchEditor(MPPMRP.COLUMNNAME_Planner_ID, false, false, true, MLookupFactory.get(getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPPProductPlanning.Table_Name, MPPMRP.COLUMNNAME_Planner_ID), DisplayType.Table)) {
private final long serialVersionUID = 1L;
public void setValue(Object arg0) {
super.setValue(arg0);
}
;
};
fWarehouse_ID = new WSearchEditor(MPPMRP.COLUMNNAME_M_Warehouse_ID, false, false, true, MLookupFactory.get(getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MWarehouse.Table_Name, MPPMRP.COLUMNNAME_M_Warehouse_ID), DisplayType.TableDir)) {
private final long serialVersionUID = 1L;
public void setValue(Object arg0) {
super.setValue(arg0);
}
;
};
fMaster.setSelected(false);
fMaster.setEnabled(false);
fMRPReq.setSelected(false);
fMRPReq.setEnabled(false);
fCreatePlan.setSelected(false);
fCreatePlan.setEnabled(false);
lUOM.setText(Msg.translate(getCtx(), MUOM.COLUMNNAME_C_UOM_ID));
fUOM.setReadonly(true);
lType.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Policy));
fType.setReadonly(true);
lOrderPeriod.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Period));
fOrderPeriod.setReadWrite(false);
lTimefence.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_TimeFence));
fTimefence.setReadWrite(false);
lLeadtime.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_DeliveryTime_Promised));
fLeadtime.setReadWrite(false);
lMinOrd.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Min));
fMinOrd.setReadWrite(false);
lMaxOrd.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Max));
fMaxOrd.setReadWrite(false);
lOrdMult.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Pack));
fOrdMult.setReadWrite(false);
lOrderQty.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Qty));
fOrderQty.setReadWrite(false);
lYield.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Yield));
fYield.setReadWrite(false);
lOnhand.setText(Msg.translate(getCtx(), MStorage.COLUMNNAME_QtyOnHand));
fOnhand.setReadWrite(false);
lSafetyStock.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_SafetyStock));
fSafetyStock.setReadWrite(false);
lReserved.setText(Msg.translate(getCtx(), MStorage.COLUMNNAME_QtyReserved));
fReserved.setReadWrite(false);
lAvailable.setText(Msg.translate(getCtx(), "QtyAvailable"));
fAvailable.setReadWrite(false);
lOrdered.setText(Msg.translate(getCtx(), MPPOrder.COLUMNNAME_QtyOrdered));
fOrdered.setReadWrite(false);
//Product Lookup
fProduct_ID = new WSearchEditor(MPPMRP.COLUMNNAME_M_Product_ID, true, false, true, MLookupFactory.get(getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MProduct.Table_Name, MPPMRP.COLUMNNAME_M_Product_ID), DisplayType.Search)) {
private final long serialVersionUID = 1L;
public void setValue(Object arg0) {
super.setValue(arg0);
}
;
};
fMaster.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_IsMPS));
fMRPReq.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_IsRequiredMRP));
fCreatePlan.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_IsCreatePlan));
//AttributeSet Button
fAttrSetInstance_ID = new Button() {
private final long serialVersionUID = 1L;
private Object m_value;
public void setLabel(String text) {
if (text == null) {
text = "---";
}
if (text.length() > 23) {
text = text.substring(0, 20) + "...";
}
super.setLabel(text);
}
public void setValue(Object arg0) {
m_value = arg0;
int i = (arg0 instanceof Integer) ? ((Integer) arg0).intValue() : 0;
if (i == 0) {
setLabel(null);
}
}
public Object getValue() {
return m_value;
}
};
fAttrSetInstance_ID.addActionListener(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
selectAttributeSetInstance();
}
});
//
fDateFrom.getComponent().setTooltiptext(Msg.translate(getCtx(), MLot.COLUMNNAME_DateFrom));
fDateTo.getComponent().setTooltiptext(Msg.translate(getCtx(), MLot.COLUMNNAME_DateTo));
fSupplyType = new WSearchEditor(MPPMRP.COLUMNNAME_TypeMRP, false, false, true, MLookupFactory.get(getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPPMRP.Table_Name, MPPMRP.COLUMNNAME_TypeMRP), DisplayType.List));
Rows rows = null;
Row row = null;
rows = new Rows();
rows.setParent(parameterPanel);
// 1st Row
row = rows.newRow();
row.appendChild(lProduct_ID.rightAlign());
row.appendChild(fProduct_ID.getComponent());
row.appendChild(lUOM.rightAlign());
row.appendChild(fUOM);
row.appendChild(lType.rightAlign());
row.appendChild(fType);
// 2nd Row
row = rows.newRow();
row.appendChild(lAttrSetInstance_ID.rightAlign());
row.appendChild(fAttrSetInstance_ID);
row.appendChild(lOnhand.rightAlign());
row.appendChild(fOnhand.getComponent());
row.appendChild(lOrderPeriod.rightAlign());
row.appendChild(fOrderPeriod.getComponent());
// 3rd Row
row = rows.newRow();
row.appendChild(lPlanner_ID.rightAlign());
row.appendChild(fPlanner_ID.getComponent());
row.appendChild(lSafetyStock.rightAlign());
row.appendChild(fSafetyStock.getComponent());
row.appendChild(lMinOrd.rightAlign());
row.appendChild(fMinOrd.getComponent());
// 4th Row
row = rows.newRow();
row.appendChild(lWarehouse_ID.rightAlign());
row.appendChild(fWarehouse_ID.getComponent());
row.appendChild(lReserved.rightAlign());
row.appendChild(fReserved.getComponent());
row.appendChild(lMaxOrd.rightAlign());
row.appendChild(fMaxOrd.getComponent());
// 5th Row
row = rows.newRow();
row.appendChild(lResource_ID.rightAlign());
row.appendChild(fResource_ID.getComponent());
row.appendChild(lAvailable.rightAlign());
row.appendChild(fAvailable.getComponent());
row.appendChild(lOrdMult.rightAlign());
row.appendChild(fOrdMult.getComponent());
// 6th Row
row = rows.newRow();
row.appendChild(lDateFrom.rightAlign());
row.appendChild(fDateFrom.getComponent());
row.appendChild(lOrdered.rightAlign());
row.appendChild(fOrdered.getComponent());
row.appendChild(lOrderQty.rightAlign());
row.appendChild(fOrderQty.getComponent());
// 7th Row
row = rows.newRow();
row.appendChild(lDateTo.rightAlign());
row.appendChild(fDateTo.getComponent());
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(lTimefence.rightAlign());
row.appendChild(fTimefence.getComponent());
// 8th Row
row = rows.newRow();
row.appendChild(new Space());
row.appendChild(fMaster);
row.appendChild(new Space());
row.appendChild(fCreatePlan);
row.appendChild(lLeadtime.rightAlign());
row.appendChild(fLeadtime.getComponent());
// 9th Row
row = rows.newRow();
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(fMRPReq);
row.appendChild(lYield.rightAlign());
row.appendChild(fYield.getComponent());
}
use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WCRP method fillPicks.
private void fillPicks() throws Exception {
Properties ctx = Env.getCtx();
MLookup resourceL = MLookupFactory.get(ctx, m_WindowNo, 0, MColumn.getColumn_ID(I_M_Product.Table_Name, "S_Resource_ID"), DisplayType.TableDir);
resource = new WSearchEditor("S_Resource_ID", false, false, true, resourceL);
}
use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WWFActivity method initForm.
protected void initForm() {
loadActivities();
fAnswerList.setMold("select");
bZoom.setImage(ServletFns.resolveThemeURL("~./images/Zoom16.png"));
bOK.setImage(ServletFns.resolveThemeURL("~./images/Ok24.png"));
MLookup lookup = MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, 10443, DisplayType.Search);
fForward = new WSearchEditor(lookup, Msg.translate(Env.getCtx(), "AD_User_ID"), "", true, false, true);
init();
display(-1);
}
use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WArchiveViewer method dynInit.
/**
* Dynamic Init
*/
private void dynInit() {
processField = new Listbox();
KeyNamePair[] keyNamePair = getProcessData();
for (int i = 0; i < keyNamePair.length; i++) processField.appendItem(keyNamePair[i].getName(), keyNamePair[i]);
tableField = new Listbox();
keyNamePair = getTableData();
for (int i = 0; i < keyNamePair.length; i++) tableField.appendItem(keyNamePair[i].getName(), keyNamePair[i]);
createdByQField = new Listbox();
keyNamePair = getUserData();
for (int i = 0; i < keyNamePair.length; i++) createdByQField.appendItem(keyNamePair[i].getName(), keyNamePair[i]);
MLookup lookup = MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, 2762, DisplayType.Search);
bPartnerField = new WSearchEditor(lookup, Msg.translate(Env.getCtx(), "C_BPartner_ID"), "", true, false, true);
}
use of org.adempiere.webui.editor.WSearchEditor in project adempiere by adempiere.
the class WCreateFromRMAUI 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 = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID");
bPartnerField.setValue(new Integer(C_BPartner_ID));
}
Aggregations