// interno // quando viene cambiata la data viene resettato anche questo protected void onRender(Element target, int index) { super.onRender(target, index); final FitLayout fl = new FitLayout(); layoutContainer.setBorders(false); layoutContainer.setLayout(fl); layoutContainer.setWidth(w - 225); layoutContainer.setHeight(h - 54); txtfldUsername.setVisible(false); selectLayout(); LayoutContainer bodyContainer = new LayoutContainer(); bodyContainer.setLayout(new FlowLayout()); bodyContainer.setBorders(false); bodyContainer.add(new CreateFormIntervalliOre()); bodyContainer.add(txtfldUsername); layoutContainer.add(bodyContainer, new FitData(5, 5, 5, 8)); add(layoutContainer); }
/** * 主窗口 */ void initmainpanel() { w = new BaseFormPanel(getStore()); w.setHeaderVisible(false); Label cardno_l = new Label("卡号:"); cardno_l.setWidth("50"); Label cname_l = new Label("名字:"); cname_l.setWidth("50"); Label sex_l = new Label("性别:"); sex_l.setWidth("50"); Label edu_l = new Label("学历:"); Label bird_l = new Label("出生日期:"); Label mobil_l = new Label("手机号:"); Label idno_l = new Label("身份证号:"); Label mark_l = new Label("备注:"); cardno_t = new TextField<String>(); cardno_t.setAllowBlank(false); cardno_t.addListener(Events.Change, this); cname_t = new TextField<String>(); cname_t.setAllowBlank(false); // passwordc_t.setAllowBlank(false); // password_t.setAllowBlank(false); // // TextField<String> sex_t = new TextField<String>(); // BaseGridEditor sex_t= CodeNameMapFactory.aa(); BaseComboBoxForm<BaseModelData> sex_t = CodeNameMapFactory.createSexInput_F(); TextField<String> edu_t = new TextField<String>(); // CodeNameMapFactory codenamemap = new CodeNameMapFactory(); // BaseGridEditor<String> edu_t =codenamemap.createSexInput_G(); // createBocdeInput_F DateField bird_t = new DateField(); bird_t.setAutoWidth(true); bird_t.getPropertyEditor().setFormat(DateTimeFormat.getFormat("yyyy-M-d H:mm:ss")); TextField<String> mobil_t = new TextField<String>(); mobil_t.setAllowBlank(false); TextField<String> idno_t = new TextField<String>(); TextArea mark_t = new TextArea(); mark_t.setSize(420, 40); // TextField<String> password_t = new TextField<String>(); password_t.setPassword(true); passwordc_t.setPassword(true); // password_t.setToolTip("将光标放到此处,并由会员录入自己的密码"); ccode_t = new TextField<String>(); // ccode_t.setEnabled(false); ccode_t.setVisible(false); icode_t = new TextField<String>(); icode_t.setVisible(false); cardno_t.setName("s_cardno"); cname_t.setName("cname"); password_t.setName("password"); sex_t.setName("s_sex"); edu_t.setName("s_edu"); bird_t.setName("s_birid"); mobil_t.setName("s_mobil"); idno_t.setName("s_idno"); mark_t.setName("s_mark"); ccode_t.setName("ccode"); icode_t.setName("icode"); // password_t.setName("password"); TableLayout tl = new TableLayout(4); tl.setWidth("600"); w.setLayout(tl); TableData td = new TableData(); td.setColspan(1); // td.setWidth("2000"); td.setMargin(100); td.setPadding(5); td.setRowspan(1); TableData td2 = new TableData(); td2.setColspan(3); // td.setWidth("2000"); td2.setMargin(100); td2.setPadding(5); td2.setRowspan(1); w.add(cardno_l, td); w.add(cardno_t, td); w.add(cname_l, td); w.add(cname_t, td); w.add(mobil_l, td); w.add(mobil_t, td); w.add(sex_l, td); w.add(sex_t, td); w.add(new Label("密码:"), td); w.add(password_t, td); w.add(new Label("重新录入密码:"), td); w.add(passwordc_t, td); w.add(edu_l, td); w.add(edu_t, td); w.add(bird_l, td); w.add(bird_t, td); w.add(idno_l, td); w.add(idno_t, td); w.add(new Label(""), td); w.add(new Label(""), td); w.add(mark_l, td); w.add(mark_t, td2); w.add(new Label("销售人员:"), td); BaseComboBoxForm<BaseModelData> cbf = createBcode_filter(); cbf.setName("rbcode"); cbf.setAllowBlank(false); w.add(cbf, td2); w.add(ccode_t, td); w.add(icode_t, td); w.setBottomComponent(addfinace); addfinace.addListener(Events.Select, this); addfinace.setEnabled(false); w.inited(); // w.setAutoHeight(true); // w.setAutoWidth(true); // w.setSize(661, 300); cardno_t.addListener(Events.Change, this); cname_t.addListener(Events.Change, this); // mobil_t.addListener(Events.Change, this); cardno_t.setValidateOnBlur(true); cname_t.setValidateOnBlur(true); }