Package org.zkoss.zul

Examples of org.zkoss.zul.Textbox$AuxInfo


    manager=(ItemManager)WebApplication.lookup(ItemManager.LocalJNDIName);
    Grid itemsGrid=(Grid)getFellow("itemsGrid");
    itemsGrid.setRowRenderer(new ItemRowRenderer());
    itemsGrid.setModel(new ListModelList());
    //Setup search
    Textbox searchText=(Textbox)getFellow("searchItemText");
    searchText.addEventListener("onChanging", new EventListener(){
      public void onEvent(Event event) throws Exception {
        search(((InputEvent)event).getValue());
      }
    });
    Combobox searchTypeCombo=(Combobox)getFellow("searchTypeCombo");
    searchTypeCombo.addEventListener("onSelect", new EventListener(){
      public void onEvent(Event event) throws Exception {
        Textbox searchText=(Textbox)getFellow("searchItemText");
        search(searchText.getValue());
      }
    });
  }
View Full Code Here


    }
  }

  public void onRefresh(){
    System.out.println("onRefresh");
    Textbox searchText=(Textbox)getFellow("searchItemText");
    search(searchText.getValue());
  }
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

        private void appendCodeListcell(final Listitem item,
                final CalendarException calendarException) {
            item.setValue(calendarException);
            Listcell listcell = new Listcell();
            final Textbox code = new Textbox();

            if (getBaseCalendar() != null) {
                code.setDisabled(getBaseCalendar().isCodeAutogenerated());
            }

            Util.bind(code, new Util.Getter<String>() {

                @Override
                public String get() {
                    return calendarException.getCode();
                }
            }, new Util.Setter<String>() {

                @Override
                public void set(String value) {
                    try {
                        calendarException.setCode(value);
                    } catch (IllegalArgumentException e) {
                        throw new WrongValueException(code, e.getMessage());
                    }
                }
            });

            code.setConstraint("no empty:" + _("cannot be empty"));

            listcell.appendChild(code);
            item.appendChild(listcell);
        }
View Full Code Here

        private void appendAvailabilityCodeListcell(Listitem item,
                final CalendarAvailability availability) {
            item.setValue(availability);
            Listcell listcell = new Listcell();
            final Textbox code = new Textbox();

            if (getBaseCalendar() != null) {
                code.setDisabled(getBaseCalendar().isCodeAutogenerated());
            }

            Util.bind(code, new Util.Getter<String>() {

                @Override
                public String get() {
                    return availability.getCode();
                }
            }, new Util.Setter<String>() {

                @Override
                public void set(String value) {
                    try {
                        availability.setCode(value);
                    } catch (IllegalArgumentException e) {
                        throw new WrongValueException(code, e.getMessage());
                    }
                }
            });

            code.setConstraint("no empty:" + _("cannot be empty"));

            listcell.appendChild(code);
            item.appendChild(listcell);
        }
View Full Code Here

        }
        editAsignedCriterions();
        updateUserBindingComponents();
        showEditWindow(_("Edit Worker: {0}", worker.getHumanId()));

        Textbox workerFirstname = (Textbox) editWindow
                .getFellow("workerFirstname");
        workerFirstname.focus();
    }
View Full Code Here

        resourcesCostCategoryAssignmentController.setResource(workerModel
                .getWorker());
        updateUserBindingComponents();
        showEditWindow(_("Create Worker"));
        resourceCalendarModel.cancel();
        Textbox workerFirstname = (Textbox) editWindow
                .getFellow("workerFirstname");
        workerFirstname.focus();
    }
View Full Code Here

            return (Treeitem) comp.getParent().getParent().getParent();
        }

        @Override
        protected void addDescriptionCell(final OrderElementTemplate element) {
            Textbox textBox = Util.bind(new Textbox(),
                    new Util.Getter<String>() {

                        @Override
                        public String get() {
                            return element.getName();
                        }
                    }, new Util.Setter<String>() {

                        @Override
                        public void set(String value) {
                            element.setName(value);
                        }
                    });
            textBox.setConstraint("no empty:" + _("cannot be empty"));
            addCell(textBox);
            putNameTextbox(element, textBox);
        }
View Full Code Here

        private void addTaskNameCell(final OrderElement orderElementForThisRow) {
            int[] path = getModel().getPath(orderElementForThisRow);
            String cssClass = "depth_" + path.length;

            Textbox textBox = Util.bind(new Textbox(),
                    new Util.Getter<String>() {

                        @Override
                        public String get() {
                            return orderElementForThisRow.getName();
                        }
                    }, new Util.Setter<String>() {

                        @Override
                        public void set(String value) {
                            orderElementForThisRow.setName(value);
                        }
                    });
            if (readOnly) {
                textBox.setDisabled(true);
            }
            textBox.setConstraint("no empty:" + _("cannot be empty"));
            addCell(cssClass, textBox);
            putNameTextbox(orderElementForThisRow, textBox);
        }
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.