Package org.zkoss.zul

Examples of org.zkoss.zul.Textbox$AuxInfo


*/
public class B2227929Initiator implements org.zkoss.zk.ui.util.Initiator {
  public void doInit(Page page, java.util.Map args) throws Exception {
  }
  public void doAfterCompose(Page page) throws Exception {
    page.getFirstRoot().appendChild(new Textbox());
  }
View Full Code Here


    Window w = new Window();
    w.setTitle("Export File Name - ["+ fileModel.size() +"]");
    w.setWidth("300px");
    w.setClosable(true);
    w.setPage(this.getPage());
    Textbox t = new Textbox();
    t.setWidth("98%");
    t.setMultiline(true);
    t.setRows(20);
    t.setParent(w);
    t.setValue(sb.toString());
    t.focus();
    w.doModal();
  }
View Full Code Here

    final Window w = new Window();
    w.setTitle("Import File Name");
    w.setWidth("300px");
    w.setClosable(true);
    w.setPage(this.getPage());
    final Textbox t = new Textbox();
    t.setWidth("98%");
    t.setMultiline(true);
    t.setRows(20);
    t.setParent(w);
    t.setConstraint("no empty");
    final Button ok = new Button("OK");
    final Button cancel = new Button("Cancel");
    ok.setParent(w);
    ok.addEventListener(Events.ON_CLICK,
        new EventListener() {
      public void onEvent(Event e) throws Exception {
        String val = t.getValue();
        String[] vals = val.trim().split("\n");
        final StringBuffer sb = new StringBuffer();
        fileModel.clear();
        final String r = getDesktop().getWebApp().getRealPath("/");
        final File test2 = new File(r, PATH);
        final File[] files = test2.listFiles(new MyFilenameFilter("", false));
        for(int j = 0; j < vals.length; j++) {
          boolean exist = false;
          for (int i = 0; i < files.length; i++) {
            if (vals[j].trim().equalsIgnoreCase(files[i].getName())) {
              fileModel.add(files[i]);
              exist = true;
              break;
            }
          }
          if (!exist) sb.append(vals[j].trim()).append("\n");
        }
        if (sb.toString().trim().length() > 0) t.setValue("Failed File Name:\n" + sb.toString());
        w.insertBefore(new Label(" \nsuccess : [" + fileModel.size() + "] failed : [" + (vals.length - fileModel.size())+ "]"),
            (Component)w.getChildren().get(0));
        ok.detach();
        cancel.detach();
      }
    });
    cancel.setParent(w);
    cancel.addEventListener(Events.ON_CLICK,
        new EventListener() {
      public void onEvent(Event e) throws Exception {
        w.detach();
      }
    });
    t.focus();
    w.doModal();
  }
View Full Code Here

        ParameterCache cache = ParameterCache.getInstance();
        String serverRootPath = cache.getOne("docRoot");
        String serverFileName = serverRootPath + File.separator + building.getBuildingId()
                + File.separator + media.getName();

        Textbox fileNameTextbox = (Textbox) getFellow("fileNameTextbox");
        if (!fileNameTextbox.getText().equals(serverFileName)) {
            //boolean success = (new File(fileNameTextbox.getText())).delete();
            fileNameTextbox.setText(serverFileName);

        }


        Label formatLable = (Label) getFellow("format");
View Full Code Here

    private boolean validate() {
        boolean isValid = true;
        Combobox systemCB = (Combobox) getFellow("system");
        Combobox typeCB = (Combobox) getFellow("type");
        Textbox fileNameTextbox = (Textbox) getFellow("fileNameTextbox");

        if (systemCB.getSelectedItem() == null
                || typeCB.getSelectedItem() == null
                || fileNameTextbox.getText() == null
                || "".equals(fileNameTextbox.getText())) {
            isValid = false;
            showMsg("請選取系統別, 資料別 或上傳檔案", "必要的選項");
        }

        return isValid;
View Full Code Here

        systemCB.setSelectedItem(this.getSelectedIndex(systemCB, form.getSystemType()));

        Combobox typeCB = (Combobox) getFellow("type");
        typeCB.setSelectedItem(this.getSelectedIndex(typeCB, form.getModelType()));

        Textbox fileNameTextbox = (Textbox) this.getFellow("fileNameTextbox");
        fileNameTextbox.setText(form.getModelFileName());

        Label formatLable = (Label) getFellow("format");
        formatLable.setValue(form.getModelFileExtension());
    }
View Full Code Here

        String systemType = cb.getSelectedItem().getValue().toString();

        Combobox typeCb = (Combobox) getFellow("type");
        String modelType = typeCb.getSelectedItem().getValue().toString();

        Textbox fileNameTextbox = (Textbox) this.getFellow("fileNameTextbox");
        String modelFileName = fileNameTextbox.getText();

        Label formatLabel = (Label) getFellow("format");
        String modelFileExtension = formatLabel.getValue();

        buildingDocForm.setBuilding(building);
View Full Code Here

    }

    public void query() {
        // get list
        Textbox buildingNameTextbox = (Textbox) this.getFellow("buildingNameTextbox");
        String queryString = buildingNameTextbox.getValue();
        Map para = new HashMap();
        para.put("buildingName", queryString);

        refreshObjEntities(para);

        // empty all fields , except the query condition field
        Building emptyObj = new Building();
        objToView(emptyObj);
        buildingNameTextbox.setText(queryString);

    }
View Full Code Here

            building = (Building) obj;
        } else {
            building = new Building();
        }

        Textbox buildingNameTextbox = (Textbox) this.getFellow("buildingNameTextbox");
        Textbox buildingZipTextbox = (Textbox) this.getFellow("buildingZipTextbox");
        Textbox buildingAddressTextbox = (Textbox) this.getFellow("buildingAddressTextbox");

        building.setBuildingName(buildingNameTextbox.getText());
        building.setBuildingZip(buildingZipTextbox.getText());
        building.setBuildingAddress(buildingAddressTextbox.getText());
        building.setOperateBy(operateBy);

        return building;
    }
View Full Code Here

    }

    public void objToView(Object obj) {
        Building var = (Building) obj;

        Textbox buildingNameTextbox = (Textbox) this.getFellow("buildingNameTextbox");
        Textbox buildingZipTextbox = (Textbox) this.getFellow("buildingZipTextbox");
        Textbox buildingAddressTextbox = (Textbox) this.getFellow("buildingAddressTextbox");

        buildingNameTextbox.setValue(var.getBuildingName());
        buildingZipTextbox.setValue(var.getBuildingZip());
        buildingAddressTextbox.setValue(var.getBuildingAddress());

    }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Textbox$AuxInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.