Search in sources :

Example 1 with WDateEditor

use of org.adempiere.webui.editor.WDateEditor 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);
}
Also used : WDateEditor(org.adempiere.webui.editor.WDateEditor) WSearchEditor(org.adempiere.webui.editor.WSearchEditor) ValueChangeEvent(org.adempiere.exceptions.ValueChangeEvent) Event(org.zkoss.zk.ui.event.Event) WTableModelEvent(org.adempiere.webui.event.WTableModelEvent) WPAttributeEditor(org.adempiere.webui.editor.WPAttributeEditor)

Example 2 with WDateEditor

use of org.adempiere.webui.editor.WDateEditor 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("");
}
Also used : WTableDirEditor(org.adempiere.webui.editor.WTableDirEditor) MLocatorLookup(org.compiere.model.MLocatorLookup) WLocatorEditor(org.adempiere.webui.editor.WLocatorEditor) WDateEditor(org.adempiere.webui.editor.WDateEditor) MLookup(org.compiere.model.MLookup) WSearchEditor(org.adempiere.webui.editor.WSearchEditor) Properties(java.util.Properties)

Example 3 with WDateEditor

use of org.adempiere.webui.editor.WDateEditor in project adempiere by adempiere.

the class WCRPDetail method jbInit.

private void jbInit() {
    dateFrom = new WDateEditor("DateFrom", true, false, true, "DateFrom");
    dateTo = new WDateEditor("DateTo", true, false, true, "DateTo");
    Rows rows = new Rows();
    Row row = null;
    new GridFactory();
    Grid northPanel = GridFactory.newGridLayout();
    rows.setParent(northPanel);
    row = rows.newRow();
    row.appendChild(new Label(Msg.translate(Env.getCtx(), "S_Resource_ID")).rightAlign());
    row.appendChild(resource.getComponent());
    row.appendChild(new Label(Msg.translate(Env.getCtx(), "DateFrom")).rightAlign());
    row.appendChild(dateFrom.getComponent());
    row.appendChild(new Label(Msg.translate(Env.getCtx(), "DateTo")).rightAlign());
    row.appendChild(dateTo.getComponent());
    ConfirmPanel confirmPanel = new ConfirmPanel(true);
    confirmPanel.addActionListener(this);
    North north = new North();
    north.appendChild(northPanel);
    mainLayout.appendChild(north);
    //West west = new West();
    //chartPanel.setWidth("400");
    //west.appendChild(chartPanel);
    //west.setSplittable(true);
    //west.setAutoscroll(true);
    //mainLayout.appendChild(west);
    South south = new South();
    south.appendChild(confirmPanel);
    mainLayout.appendChild(south);
}
Also used : WDateEditor(org.adempiere.webui.editor.WDateEditor) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Grid(org.adempiere.webui.component.Grid) GridFactory(org.adempiere.webui.component.GridFactory) Label(org.adempiere.webui.component.Label) South(org.zkoss.zul.South) North(org.zkoss.zul.North) Row(org.zkoss.zul.Row) Rows(org.adempiere.webui.component.Rows)

Aggregations

WDateEditor (org.adempiere.webui.editor.WDateEditor)3 WSearchEditor (org.adempiere.webui.editor.WSearchEditor)2 Properties (java.util.Properties)1 ValueChangeEvent (org.adempiere.exceptions.ValueChangeEvent)1 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)1 Grid (org.adempiere.webui.component.Grid)1 GridFactory (org.adempiere.webui.component.GridFactory)1 Label (org.adempiere.webui.component.Label)1 Rows (org.adempiere.webui.component.Rows)1 WLocatorEditor (org.adempiere.webui.editor.WLocatorEditor)1 WPAttributeEditor (org.adempiere.webui.editor.WPAttributeEditor)1 WTableDirEditor (org.adempiere.webui.editor.WTableDirEditor)1 WTableModelEvent (org.adempiere.webui.event.WTableModelEvent)1 MLocatorLookup (org.compiere.model.MLocatorLookup)1 MLookup (org.compiere.model.MLookup)1 Event (org.zkoss.zk.ui.event.Event)1 North (org.zkoss.zul.North)1 Row (org.zkoss.zul.Row)1 South (org.zkoss.zul.South)1