Search in sources :

Example 26 with Rows

use of org.adempiere.webui.component.Rows in project adempiere by adempiere.

the class InfoCashLinePanel method statInit.

// InfoCashLinePanel
/**
	 *	Static Setup - add fields to parameterPanel
	 *  @throws Exception if Lookups cannot be created
	 */
private void statInit() {
    // 	Format the dates and number boxes
    fDateFrom.setWidth("97px");
    fDateTo.setWidth("97px");
    fAmtFrom.getDecimalbox().setWidth("90px");
    fAmtTo.getDecimalbox().setWidth("90px");
    fDateFrom.setAttribute("zk_component_ID", "Lookup_Criteria_DateFrom");
    fDateFrom.addEventListener(Events.ON_CHANGE, this);
    fDateTo.setAttribute("zk_component_ID", "Lookup_Criteria_DateTo");
    fDateTo.addEventListener(Events.ON_CHANGE, this);
    fAmtFrom.setAttribute("zk_component_ID", "Lookup_Criteria_AmtFrom");
    fAmtFrom.addEventListener(Events.ON_CHANGE, this);
    fAmtTo.setAttribute("zk_component_ID", "Lookup_Criteria_AmtTo");
    fAmtTo.addEventListener(Events.ON_CHANGE, this);
    SimpleDateFormat dateFormat = DisplayType.getDateFormat(DisplayType.Date, AEnv.getLanguage(Env.getCtx()));
    fDateFrom.setFormat(dateFormat.toPattern());
    fDateTo.setFormat(dateFormat.toPattern());
    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());
    //  Create the main criteria fields
    //  5241 - C_Cash.C_Cash_ID
    fCash_ID = new WSearchEditor(MLookupFactory.get(Env.getCtx(), p_WindowNo, p_TabNo, MColumn.getColumn_ID(MCash.Table_Name, MCash.COLUMNNAME_C_Cash_ID), DisplayType.TableDir), Msg.translate(Env.getCtx(), "C_Cash_ID"), "", false, false, true);
    fCash_ID.addValueChangeListener(this);
    fCash_ID.getComponent().setAttribute("zk_component_ID", "Lookup_Criteria_C_Cash_ID");
    // 5249 - C_Cash.C_CashBook_ID
    fCashBook_ID = new WTableDirEditor(MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MCash.Table_Name, MCash.COLUMNNAME_C_CashBook_ID), DisplayType.TableDir), Msg.translate(Env.getCtx(), "C_CashBook_ID"), "", false, false, true);
    fCashBook_ID.getComponent().addEventListener(Events.ON_CHANGE, this);
    //fCashBook_ID.addValueChangeListener(this);
    fCashBook_ID.getComponent().setAttribute("zk_component_ID", "Lookup_Criteria_C_CashBook_ID");
    //  Width is set in WTableDirEditor to 200px.  Make it more flexible;
    fCashBook_ID.getComponent().setWidth("100%");
    // 5354 - C_CashLine.C_Invoice_ID
    fInvoice_ID = new WSearchEditor(MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MCashLine.Table_Name, MCashLine.COLUMNNAME_C_Invoice_ID), DisplayType.Search), Msg.translate(Env.getCtx(), "C_Invoice_ID"), "", false, false, true);
    fInvoice_ID.addValueChangeListener(this);
    fInvoice_ID.getComponent().setAttribute("zk_component_ID", "Lookup_Criteria_C_Invoice_ID");
    //	5296 - C_CashLine.C_Charge_ID
    fPayment_ID = new WSearchEditor(MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MCashLine.Table_Name, MCashLine.COLUMNNAME_C_Payment_ID), DisplayType.TableDir), Msg.translate(Env.getCtx(), "C_Payment_ID"), "", false, false, true);
    fPayment_ID.getComponent().setAttribute("zk_component_ID", "Lookup_Criteria_C_Payment_ID");
    //	5295 - C_CashLine.C_BankAccount_ID
    fBankAccount_ID = new WTableDirEditor(MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MCashLine.Table_Name, MCashLine.COLUMNNAME_C_BankAccount_ID), DisplayType.TableDir), Msg.translate(Env.getCtx(), "C_BankAccount_ID"), "", false, false, true);
    fBankAccount_ID.getComponent().addEventListener(Events.ON_CHANGE, this);
    //fBankAccount_ID.addValueChangeListener(this);
    fBankAccount_ID.getComponent().setAttribute("zk_component_ID", "Lookup_Criteria_C_BankAccount_ID");
    //  Width is set in WTableDirEditor to 200px.  Make it more flexible;
    fBankAccount_ID.getComponent().setWidth("100%");
    //	5296 - C_CashLine.C_Charge_ID
    fCharge_ID = new WTableDirEditor(MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MCashLine.Table_Name, MCashLine.COLUMNNAME_C_Charge_ID), DisplayType.TableDir), Msg.translate(Env.getCtx(), "C_Charge_ID"), "", false, false, true);
    fCharge_ID.getComponent().addEventListener(Events.ON_CHANGE, this);
    fCharge_ID.getComponent().setAttribute("zk_component_ID", "Lookup_Criteria_C_Charge_ID");
    //  Width is set in WTableDirEditor to 200px.  Make it more flexible;
    fCharge_ID.getComponent().setWidth("100%");
    cbAbsolute.setLabel(Msg.translate(Env.getCtx(), "AbsoluteAmt"));
    cbAbsolute.addEventListener(Events.ON_CHECK, this);
    cbAbsolute.setAttribute("zk_component_ID", "Lookup_Criteria_AbsoluteAmt");
    //  Setup the criteria.  The rest of the panel is managed by the info.java class
    Rows rows = new Rows();
    Row row = new Row();
    rows.appendChild(row);
    row.appendChild(fCashBook_ID.getLabel().rightAlign());
    row.appendChild(fCashBook_ID.getComponent());
    row.appendChild(fCash_ID.getLabel().rightAlign());
    row.appendChild(fCash_ID.getComponent());
    row = new Row();
    rows.appendChild(row);
    row.appendChild(fInvoice_ID.getLabel().rightAlign());
    row.appendChild(fInvoice_ID.getComponent());
    row.appendChild(fPayment_ID.getLabel().rightAlign());
    row.appendChild(fPayment_ID.getComponent());
    row = new Row();
    //row.setSpans("1, 1, 1, 1");
    rows.appendChild(row);
    row.appendChild(fBankAccount_ID.getLabel().rightAlign());
    row.appendChild(fBankAccount_ID.getComponent());
    row.appendChild(lDateFrom.rightAlign());
    Hbox hbox = new Hbox();
    hbox.appendChild(fDateFrom);
    hbox.appendChild(lDateTo);
    hbox.appendChild(fDateTo);
    row.appendChild(hbox);
    row = new Row();
    //row.setSpans("1, 1, 1, 1");
    rows.appendChild(row);
    row.appendChild(fCharge_ID.getLabel().rightAlign());
    row.appendChild(fCharge_ID.getComponent());
    row.appendChild(lAmtFrom.rightAlign());
    hbox = new Hbox();
    hbox.appendChild(fAmtFrom);
    hbox.appendChild(lAmtTo);
    hbox.appendChild(fAmtTo);
    hbox.appendChild(cbAbsolute);
    row.appendChild(hbox);
    p_criteriaGrid.appendChild(rows);
    super.setSizes();
}
Also used : WTableDirEditor(org.adempiere.webui.editor.WTableDirEditor) Hbox(org.zkoss.zul.Hbox) DecimalFormat(java.text.DecimalFormat) WSearchEditor(org.adempiere.webui.editor.WSearchEditor) Row(org.adempiere.webui.component.Row) SimpleDateFormat(java.text.SimpleDateFormat) Rows(org.adempiere.webui.component.Rows)

Example 27 with Rows

use of org.adempiere.webui.component.Rows in project adempiere by adempiere.

the class InfoGeneralPanel method initComponents.

private void initComponents() {
    Rows rows = new Rows();
    Row row = new Row();
    rows.appendChild(row);
    row.appendChild(lbl1.rightAlign());
    row.appendChild(txt1);
    row.appendChild(lbl2.rightAlign());
    row.appendChild(txt2);
    row.appendChild(lbl3.rightAlign());
    row.appendChild(txt3);
    row.appendChild(lbl4.rightAlign());
    row.appendChild(txt4);
    p_criteriaGrid.appendChild(rows);
    super.setSizes();
}
Also used : Row(org.adempiere.webui.component.Row) Rows(org.adempiere.webui.component.Rows)

Example 28 with Rows

use of org.adempiere.webui.component.Rows in project adempiere by adempiere.

the class InfoPaymentPanel method statInit.

// InfoPaymentPanel
/**
	 *	Static Setup - add fields to parameterPanel
	 */
private void statInit() {
    fDocumentNo = new Textbox();
    fDocumentNo.setWidth("100%");
    fDocumentNo.addEventListener(Events.ON_CHANGE, this);
    fDocumentNo.setAttribute("zk_component_ID", "Lookup_Criteria_fDocumentNo");
    fDocumentNo.addEventListener(Events.ON_CHANGE, this);
    // 	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());
    //
    fCheckReceipt.setLabel(Msg.translate(Env.getCtx(), "OnlyReceipt"));
    fCheckReceipt.setName("OnlyReceipt");
    fCheckReceipt.addEventListener(Events.ON_CHECK, this);
    fCheckReceipt.setAttribute("zk_component_ID", "Lookup_Criteria_CheckReceipt");
    //
    fCheckPayment.setLabel(Msg.translate(Env.getCtx(), "OnlyPayment"));
    fCheckPayment.setName("OnlyPayment");
    fCheckPayment.addEventListener(Events.ON_CHECK, this);
    fCheckPayment.setAttribute("zk_component_ID", "Lookup_Criteria_CheckPayment");
    //
    fBPartner_ID = new WSearchEditor(MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPayment.Table_Name, MPayment.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);
    fBankAccount_ID = new WSearchEditor(MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPayment.Table_Name, MPayment.COLUMNNAME_C_BankAccount_ID), DisplayType.Search), Msg.translate(Env.getCtx(), "C_BankAccount_ID"), "", false, false, true);
    fBankAccount_ID.getComponent().setAttribute("zk_component_ID", "Lookup_Criteria_C_BankAccount_ID");
    fBankAccount_ID.addValueChangeListener(this);
    Rows rows = new Rows();
    Row row = new Row();
    rows.appendChild(row);
    row.appendChild(lDocumentNo.rightAlign());
    row.appendChild(fDocumentNo);
    row.appendChild(fBPartner_ID.getLabel().rightAlign());
    row.appendChild(fBPartner_ID.getComponent());
    row.appendChild(fCheckReceipt);
    row = new Row();
    rows.appendChild(row);
    row.appendChild(fBankAccount_ID.getLabel().rightAlign());
    row.appendChild(fBankAccount_ID.getComponent());
    row.appendChild(lDateFrom.rightAlign());
    Hbox hbox = new Hbox();
    hbox.appendChild(fDateFrom);
    hbox.appendChild(lDateTo);
    hbox.appendChild(fDateTo);
    row.appendChild(hbox);
    row.appendChild(fCheckPayment);
    row = new Row();
    rows.appendChild(row);
    row.appendCellChild(lAmtFrom.rightAlign(), 3);
    hbox = new Hbox();
    hbox.appendChild(fAmtFrom);
    hbox.appendChild(lAmtTo);
    hbox.appendChild(fAmtTo);
    row.appendCellChild(hbox, 1);
    p_criteriaGrid.appendChild(rows);
    super.setSizes();
}
Also used : Hbox(org.zkoss.zul.Hbox) Datebox(org.adempiere.webui.component.Datebox) DecimalFormat(java.text.DecimalFormat) Textbox(org.adempiere.webui.component.Textbox) WSearchEditor(org.adempiere.webui.editor.WSearchEditor) NumberBox(org.adempiere.webui.component.NumberBox) Row(org.adempiere.webui.component.Row) SimpleDateFormat(java.text.SimpleDateFormat) Rows(org.adempiere.webui.component.Rows)

Example 29 with Rows

use of org.adempiere.webui.component.Rows in project adempiere by adempiere.

the class InfoBPartnerPanel method statInit.

private void statInit() {
    initComponents();
    fieldValue.setWidth("100%");
    fieldContact.setWidth("100%");
    fieldPhone.setWidth("100%");
    fieldName.setWidth("100%");
    fieldEMail.setWidth("100%");
    fieldPostal.setWidth("100%");
    Rows rows = new Rows();
    Row row = new Row();
    rows.appendChild(row);
    row.appendChild(labelValue.rightAlign());
    row.appendChild(fieldValue);
    row.appendChild(labelContact.rightAlign());
    row.appendChild(fieldContact);
    row.appendChild(labelPhone.rightAlign());
    row.appendChild(fieldPhone);
    row.appendChild(checkCustomer);
    row = new Row();
    rows.appendChild(row);
    row.appendChild(labelName.rightAlign());
    row.appendChild(fieldName);
    row.appendChild(labelEMail.rightAlign());
    row.appendChild(fieldEMail);
    row.appendChild(labelPostal.rightAlign());
    row.appendChild(fieldPostal);
    row.appendChild(checkAND);
    statusBar.setEastVisibility(false);
    //  Contact Tab
    ColumnInfo[] s_layoutContact = new ColumnInfo[] { new ColumnInfo(" ", "AD_User_ID", IDColumn.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_Greeting_ID"), "(SELECT g.Greeting from C_Greeting g WHERE g.C_Greeting_ID = AD_User.C_Greeting_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Title"), "Title", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_Location_ID"), "(SELECT a.Name from C_BPartner_Location a WHERE AD_User.C_BPartner_Location_ID=a.C_BPartner_Location_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone"), "Phone", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone2"), "Phone2", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Fax"), "Fax", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "EMail"), "EMail", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "LastContact"), "LastContact", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "LastResult"), "LastResult", String.class) };
    //  From Clause
    String s_sqlFrom = "AD_User";
    //  Where Clause					
    String s_sqlWhere = "C_BPartner_ID = ?  and IsActive = 'Y'";
    m_sqlContact = contactTbl.prepareTable(s_layoutContact, s_sqlFrom, s_sqlWhere, false, "AD_User");
    contactTbl.setMultiSelection(false);
    contactTbl.autoSize();
    contactTbl.getModel().addTableModelListener(this);
    contactTbl.setAttribute("zk_component_ID", "Lookup_Data_Contact");
    //  Location Tab
    ColumnInfo[] s_layoutAddress = new ColumnInfo[] { new ColumnInfo(" ", "l.C_BPartner_Location_ID", IDColumn.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "l.Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone"), "l.Phone", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone2"), "l.Phone2", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Fax"), "l.Fax", String.class), // Replaced with parsed value
    new ColumnInfo(Msg.translate(Env.getCtx(), "Address"), "a.Address1", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsShipTo"), "l.IsShipTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsBillTo"), "l.IsBillTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsRemitTo"), "l.IsRemitTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsPayFrom"), "l.IsPayFrom", Boolean.class) };
    ADDRESS_INDEX = 5;
    /**	From Clause							*/
    String s_locationFrom = "C_BPartner_Location l" + " LEFT OUTER JOIN C_Location a ON (l.C_Location_ID=a.C_Location_ID)";
    /** Where Clause						*/
    String s_locationWhere = "l.C_BPartner_ID = ? and l.IsActive = 'Y'";
    m_sqlAddress = addressTbl.prepareTable(s_layoutAddress, s_locationFrom, s_locationWhere, false, "l");
    addressTbl.setMultiSelection(false);
    addressTbl.autoSize();
    addressTbl.getModel().addTableModelListener(this);
    addressTbl.setAttribute("zk_component_ID", "Lookup_Data_Address");
    //
    detailTabBox.setHeight("100%");
    Tabpanels tabPanels = new Tabpanels();
    detailTabBox.appendChild(tabPanels);
    Tabs tabs = new Tabs();
    detailTabBox.appendChild(tabs);
    Tab tab = new Tab(Util.cleanAmp(Msg.translate(Env.getCtx(), "Contact")));
    tab.addEventListener(Events.ON_SELECT, this);
    tabs.appendChild(tab);
    Tabpanel desktopTabPanel = new Tabpanel();
    desktopTabPanel.setHeight("100%");
    desktopTabPanel.appendChild(contactTbl);
    tabPanels.appendChild(desktopTabPanel);
    tab = new Tab(Msg.translate(Env.getCtx(), "Location"));
    tab.addEventListener(Events.ON_SELECT, this);
    tabs.appendChild(tab);
    desktopTabPanel = new Tabpanel();
    desktopTabPanel.setHeight("100%");
    desktopTabPanel.appendChild(addressTbl);
    tabPanels.appendChild(desktopTabPanel);
    tabs.setAttribute("zk_component_ID", "Subordinate_Tabs");
    Borderlayout southSP = new Borderlayout();
    Center center = new Center();
    North north = new North();
    center.appendChild(detailTabBox);
    southSP.appendChild(north);
    southSP.appendChild(center);
    p_centerSouth.setTitle(Msg.translate(Env.getCtx(), "ContactAndAddress"));
    p_centerSouth.setTooltiptext(Msg.translate(Env.getCtx(), "ContactAndAddress"));
    p_centerSouth.appendChild(southSP);
    p_criteriaGrid.appendChild(rows);
    super.setSizes();
    contactTbl.addActionListener(new EventListener<Event>() {

        public void onEvent(Event event) throws Exception {
            int leadRowKey = 0;
            if (contactTbl != null || contactTbl.getRowCount() > 0)
                leadRowKey = contactTbl.getLeadRowKey();
            if (m_AD_User_ID != leadRowKey) {
                //  From the contact table
                m_AD_User_ID = leadRowKey;
            }
        }
    });
    addressTbl.addActionListener(new EventListener<Event>() {

        public void onEvent(Event event) throws Exception {
            int leadRowKey = 0;
            if (addressTbl != null || addressTbl.getRowCount() > 0)
                leadRowKey = addressTbl.getLeadRowKey();
            if (m_C_BPartner_Location_ID != leadRowKey) {
                //  From the main table
                m_C_BPartner_Location_ID = leadRowKey;
            }
        }
    });
}
Also used : Center(org.zkoss.zul.Center) ColumnInfo(org.compiere.minigrid.ColumnInfo) Borderlayout(org.zkoss.zul.Borderlayout) SQLException(java.sql.SQLException) Tab(org.adempiere.webui.component.Tab) Tabpanels(org.adempiere.webui.component.Tabpanels) Tabs(org.adempiere.webui.component.Tabs) Event(org.zkoss.zk.ui.event.Event) North(org.zkoss.zul.North) Row(org.adempiere.webui.component.Row) Tabpanel(org.adempiere.webui.component.Tabpanel) Rows(org.adempiere.webui.component.Rows)

Example 30 with Rows

use of org.adempiere.webui.component.Rows in project adempiere by adempiere.

the class InfoInOutPanel method statInit.

// InfoInOutPanel
/**
	 *	Static Setup - add fields to parameterPanel
	 */
private void statInit() {
    fDocumentNo.setWidth("100%");
    fDocumentNo.addEventListener(Events.ON_CHANGE, this);
    fDocumentNo.setAttribute("zk_component_ID", "Lookup_Criteria_DocumentNo");
    fDescription.setWidth("100%");
    fDescription.addEventListener(Events.ON_CHANGE, this);
    fDescription.setAttribute("zk_component_ID", "Lookup_Criteria_Description");
    fPOReference.setWidth("100%");
    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());
    fIsSOTrx.setLabel(Msg.translate(Env.getCtx(), "IsSOTrx"));
    fIsSOTrx.setName("IsSOTrx");
    fIsSOTrx.setAttribute("zk_component_ID", "Lookup_Criteria_IsSoTrx");
    fIsSOTrx.addActionListener(this);
    fIsSOTrx.setChecked(!"N".equals(Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx")));
    fBPartner_ID = new WSearchEditor(MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MInOut.Table_Name, MInOut.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);
    //
    fShipper_ID = new WSearchEditor(MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MInOut.Table_Name, MInOut.COLUMNNAME_M_Shipper_ID), DisplayType.TableDir), Msg.translate(Env.getCtx(), "M_Shipper_ID"), "", false, false, true);
    fShipper_ID.getComponent().setAttribute("zk_component_ID", "Lookup_Criteria_M_Shipper_ID");
    fShipper_ID.addValueChangeListener(this);
    Rows rows = new Rows();
    Row row = new Row();
    rows.appendChild(row);
    row.appendCellChild(lDocumentNo.rightAlign());
    row.appendCellChild(fDocumentNo);
    row.appendCellChild(fBPartner_ID.getLabel().rightAlign());
    row.appendCellChild(fBPartner_ID.getComponent());
    row.appendCellChild(fIsSOTrx);
    row = new Row();
    rows.appendChild(row);
    row.appendCellChild(lDescription.rightAlign());
    row.appendCellChild(fDescription);
    row.appendCellChild(lDateFrom.rightAlign());
    Hbox hbox = new Hbox();
    hbox.appendChild(fDateFrom);
    hbox.appendChild(lDateTo);
    hbox.appendChild(fDateTo);
    row.appendCellChild(hbox, 2);
    row = new Row();
    rows.appendChild(row);
    row.appendCellChild(lPOReference.rightAlign());
    row.appendCellChild(fPOReference);
    row.appendCellChild(fShipper_ID.getLabel().rightAlign());
    row.appendCellChild(fShipper_ID.getComponent());
    row.appendCellChild(new Label());
    p_criteriaGrid.appendChild(rows);
    super.setSizes();
}
Also used : Hbox(org.zkoss.zul.Hbox) Datebox(org.adempiere.webui.component.Datebox) Label(org.adempiere.webui.component.Label) WSearchEditor(org.adempiere.webui.editor.WSearchEditor) Row(org.adempiere.webui.component.Row) SimpleDateFormat(java.text.SimpleDateFormat) Rows(org.adempiere.webui.component.Rows)

Aggregations

Rows (org.adempiere.webui.component.Rows)76 Row (org.adempiere.webui.component.Row)69 Label (org.adempiere.webui.component.Label)28 Grid (org.adempiere.webui.component.Grid)27 Panel (org.adempiere.webui.component.Panel)20 Center (org.zkoss.zul.Center)17 Div (org.zkoss.zul.Div)15 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)13 Hbox (org.zkoss.zul.Hbox)13 Space (org.zkoss.zul.Space)13 South (org.zkoss.zul.South)12 Center (org.zkoss.zkex.zul.Center)11 North (org.zkoss.zul.North)11 North (org.zkoss.zkex.zul.North)10 Borderlayout (org.zkoss.zul.Borderlayout)10 Separator (org.zkoss.zul.Separator)10 South (org.zkoss.zkex.zul.South)8 Caption (org.zkoss.zul.Caption)6 Tab (org.adempiere.webui.component.Tab)5 Row (org.zkoss.zul.Row)5