Package org.zkoss.zul

Examples of org.zkoss.zul.ListModelList


    listheader.setSclass("FDListBoxHeader1");
    listheader.setParent(listhead);
    listheader.setLabel(_listHeader1);

    // Model
    listbox.setModel(new ListModelList(getBrancheService().getAllBranches()));

    try {
      doModal();
    } catch (SuspendNotAllowedException e) {
      logger.fatal("", e);
View Full Code Here


    }

    // TODO chnagwed to ListPagedWrapper
    // +++++++++++++++++++++++ DropDown ListBox ++++++++++++++++++++++ //
    // set listModel and itemRenderer for the Branch dropdown listbox
    kunBranche.setModel(new ListModelList(getBrancheService().getAllBranches()));
    kunBranche.setItemRenderer(new CustomerBrancheListModelItemRenderer());

    // +++++++++++++++++++++++ DropDown ListBox ++++++++++++++++++++++ //
    // set listModel and itemRenderer for the search operator type listboxes
    sortOperator_kunNr.setModel(new ListModelList(new SearchOperators().getAllOperators(), true));
    sortOperator_kunNr.setItemRenderer(new SearchOperatorListModelItemRenderer());
    sortOperator_kunMatchcode.setModel(new ListModelList(new SearchOperators().getAllOperators()));
    sortOperator_kunMatchcode.setItemRenderer(new SearchOperatorListModelItemRenderer());
    sortOperator_kunName1.setModel(new ListModelList(new SearchOperators().getAllOperators()));
    sortOperator_kunName1.setItemRenderer(new SearchOperatorListModelItemRenderer());
    sortOperator_kunName2.setModel(new ListModelList(new SearchOperators().getAllOperators()));
    sortOperator_kunName2.setItemRenderer(new SearchOperatorListModelItemRenderer());
    sortOperator_kunOrt.setModel(new ListModelList(new SearchOperators().getAllOperators()));
    sortOperator_kunOrt.setItemRenderer(new SearchOperatorListModelItemRenderer());
    sortOperator_kunBranch.setModel(new ListModelList(new SearchOperators().getAllOperators()));
    sortOperator_kunBranch.setItemRenderer(new SearchOperatorListModelItemRenderer());

    // ++++ Restore the search mask input definition ++++ //
    // if exists a searchObject than show formerly inputs of filter values
    if (args.containsKey("searchObject")) {
      final HibernateSearchObject<Customer> searchObj = (HibernateSearchObject<Customer>) args.get("searchObject");

      // get the filters from the searchObject
      final List<Filter> ft = searchObj.getFilters();

      for (final Filter filter : ft) {

        // restore founded properties
        if (filter.getProperty().equals("kunNr")) {
          restoreOperator(sortOperator_kunNr, filter);
          kunNr.setValue(filter.getValue().toString());
        } else if (filter.getProperty().equals("kunMatchcode")) {
          restoreOperator(sortOperator_kunMatchcode, filter);
          kunMatchcode.setValue(filter.getValue().toString());
        } else if (filter.getProperty().equals("kunName1")) {
          restoreOperator(sortOperator_kunName1, filter);
          kunName1.setValue(filter.getValue().toString());
        } else if (filter.getProperty().equals("kunName2")) {
          restoreOperator(sortOperator_kunName2, filter);
          kunName2.setValue(filter.getValue().toString());
        } else if (filter.getProperty().equals("kunOrt")) {
          restoreOperator(sortOperator_kunOrt, filter);
          kunOrt.setValue(filter.getValue().toString());
        } else if (filter.getProperty().equals("branche")) {
          restoreOperator(sortOperator_kunBranch, filter);
          ListModelList lml = (ListModelList) this.kunBranche.getModel();
          // get and select the customers branch
          Branche branche = (Branche) filter.getValue();
          kunBranche.setSelectedIndex(lml.indexOf(branche));
        }
      }
    }

    showCustomerSeekDialog();
View Full Code Here

        } catch (DataAccessException e) {
          ZksampleMessageUtils.showErrorMessage(e.getMostSpecificCause().toString());
        }

        // now synchronize the listBox in the parent zul-file
        ListModelList lml = (ListModelList) listBoxOrder.getListModel();

        // Check if the branch object is new or updated
        // -1 means that the obj is not in the list, so it's
        // new.
        if (lml.indexOf(order) == -1) {
        } else {
          lml.remove(lml.indexOf(order));
        }

        orderDialogWindow.onClose(); // close
        // the
        // dialog
View Full Code Here

    kunName1.setValue("");
    aufNr.setValue("");
    aufBezeichnung.setValue("");

    // clear the listbox if data exists
    ListModelList lml = (ListModelList) this.listBoxOrderOrderPositions.getModel();
    if (lml != null)
      lml.clear();

    // doSetValidation();
  }
View Full Code Here

      btnCtrl.setBtnStatus_Save();
      return;
    }

    // now synchronize the offices listBox
    ListModelList lml = (ListModelList) listBoxOrder.getListModel();

    // Check if the object is new or updated
    // -1 means that the object is not in the list, so its new.
    if (lml.indexOf(anOrder) == -1) {
      lml.add(anOrder);
    } else {
      lml.set(lml.indexOf(anOrder), anOrder);
    }

    // bind the vars new for updating the components
    // officeCtrl.doBindNew();
View Full Code Here

        soCustomer.addSort("kunName1", false);
        // Set the ListModel
        getCustomerListCtrl().getPagedListWrapper().setSearchObject(soCustomer);

        // now synchronize the customers listBox
        final ListModelList lml = (ListModelList) getCustomerListCtrl().listBoxCustomer.getListModel();

        // Check if the customer object is new or updated
        // -1 means that the obj is not in the list, so it's
        // new..
        if (lml.indexOf(aCustomer) == -1) {
        } else {
          lml.remove(lml.indexOf(aCustomer));
        }

        CustomerDialogCtrl.this.window_customerDialog.onClose(); // close
        // the
        // dialog
View Full Code Here

    // call from cusromerList then synchronize the customers listBox
    if (getCustomerListCtrl().listBoxCustomer != null) {

      // now synchronize the customer listBox
      final ListModelList lml = (ListModelList) getCustomerListCtrl().listBoxCustomer.getListModel();

      // Check if the customer object is new or updated
      // -1 means that the obj is not in the list, so it's new.
      if (lml.indexOf(aCustomer) == -1) {
        lml.add(aCustomer);
      } else {
        lml.set(lml.indexOf(aCustomer), aCustomer);
      }

    }

    doReadOnly();
View Full Code Here

      ResultObject ro = getYoutubeLinkService().getAllYoutubeLinks(0, getPageSize());
      List<YoutubeLink> resultList = (List<YoutubeLink>) ro.getList();
      paging.setTotalSize(ro.getTotalCount());

      // set the model
      setListModelList(new ListModelList(resultList));
      this.listbox.setModel(getListModelList());

      try {
        doModal();
      } catch (SuspendNotAllowedException e) {
View Full Code Here

      ResultObject ro = getYoutubeLinkService().getAllYoutubeLinks(start, getPageSize());
      List<YoutubeLink> resultList = (List<YoutubeLink>) ro.getList();
      this.paging.setTotalSize(ro.getTotalCount());

      // set the model
      setListModelList(new ListModelList(resultList));
      this.listbox.setModel(getListModelList());
    }
View Full Code Here

    }

  }

  public void updateList() {
    _listBox.setModel(new ListModelList(_service.getAllLogsServerPushForSuccess()));
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.ListModelList

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.