Package org.zkoss.zul

Examples of org.zkoss.zul.Combobox$Renderer


 
  private void initAddr() {
    if (isCellHasDisplayString)
      return;

    final Combobox addr = (Combobox)content.getFellow("addrCombobox");
    addr.addEventListener(Events.ON_CHANGING, new EventListener() {
     
      @Override
      public void onEvent(Event evt) {
        displayHyperlink.setValue(((InputEvent)evt).getValue());
      }
    });
    addr.addEventListener(Events.ON_SELECT, new EventListener() {
     
      @Override
      public void onEvent(Event evt) throws Exception {
        Comboitem seld = (Comboitem)addr.getSelectedItem();
        if (seld != null)
          displayHyperlink.setValue(seld.getLabel());
      }
    });
    addr.addEventListener(Events.ON_OK, onOkEventListener);
    addr.focus();
  }
View Full Code Here


  /**
   * Returns the string of web page address, return null if component not found
   * @return
   */
  private String getWebAddress() {
    Combobox address = (Combobox)content.getFellow("addrCombobox");
    String val = address.getValue();
    return val == null ? "" : val;
  }
View Full Code Here

  public void setAvailableUrls(List urls) {
   
  }
 
  public String getUrl() {
    Combobox addrCB = (Combobox)getFellow("addrCombobox");
    return addrCB.getText();
  }
View Full Code Here

    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

  }

  private void search(String searchKey){

    //refresh with last search type
    final Combobox searchTypeCombo=(Combobox)getFellow("searchTypeCombo");
    int selectedIndex=searchTypeCombo.getSelectedIndex();
    if(selectedIndex>-1){
      int searchType=new Integer(searchTypeCombo.getSelectedItem().getValue().toString());
      switch(searchType){
      case 1 :
        updateGridWithEANSearch(searchKey);
        break;
      case 2 :
View Full Code Here

    public boolean isCalendarNotNull() {
        return !isCalendarNull();
    }

    private void createCalendar() {
        Combobox combobox = (Combobox) getCurrentWindow().getFellow(
                "createDerivedCalendar");
        Comboitem selectedItem = combobox.getSelectedItem();
        if (selectedItem == null) {
            throw new WrongValueException(combobox,
                    "You should select one calendar");
        }
        BaseCalendar parentCalendar = (BaseCalendar) combobox.getSelectedItem()
                .getValue();
        if (parentCalendar == null) {
            parentCalendar = workerModel.getDefaultCalendar();
        }
View Full Code Here

            BaseCalendar calendar = (BaseCalendar) data;
            item.setLabel(calendar.getName());
            item.setValue(calendar);

            if (isDefaultCalendar(calendar)) {
                Combobox combobox = (Combobox) item.getParent();
                combobox.setSelectedItem(item);
            }
        }
View Full Code Here

    }

    private IBaseCalendarModel resourceCalendarModel;

    private void createCalendar() {
        Combobox combobox = (Combobox) editWindow
                .getFellow("createDerivedCalendar");
        Comboitem selectedItem = combobox.getSelectedItem();
        if (selectedItem == null) {
            throw new WrongValueException(combobox,
                    _("Please, select a calendar"));
        }

        BaseCalendar parentCalendar = (BaseCalendar) combobox.getSelectedItem()
                .getValue();
        if (parentCalendar == null) {
            parentCalendar = machineModel.getDefaultCalendar();
        }
View Full Code Here

    private void appendComboboxLabelTypes(final Row row) {
        final WorkReportLabelTypeAssigment workReportLabelTypeAssigment = (WorkReportLabelTypeAssigment) row
                .getValue();

        final Combobox comboLabelTypes = createComboboxLabelTypes(workReportLabelTypeAssigment);
        comboLabelTypes.setParent(row);

        comboLabelTypes.addEventListener(Events.ON_CHANGE, new EventListener() {
            @Override
            public void onEvent(Event event) {
                changeLabelType(comboLabelTypes.getSelectedItem(),
                        workReportLabelTypeAssigment);
                validateIfExistTheSameLabelType(comboLabelTypes,
                        workReportLabelTypeAssigment);
                Util.reloadBindings(listWorkReportLabelTypeAssigments);
            }
View Full Code Here

        LabelType selectedLabelType = null;
        if (selectedItemType != null) {
            selectedLabelType = (LabelType) selectedItemType.getValue();
        }

        final Combobox comboLabels = createComboboxLabels(selectedLabelType,
                workReportLabelTypeAssigment);
        comboLabels.setParent(row);

        comboLabels.addEventListener(Events.ON_CHANGE, new EventListener() {
            @Override
            public void onEvent(Event event) {
                changeLabel(comboLabels.getSelectedItem(),
                        workReportLabelTypeAssigment);
                Util.reloadBindings(listWorkReportLabelTypeAssigments);
            }
        });
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Combobox$Renderer

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.