Examples of BindingListModelList


Examples of org.zkoss.zkplus.databind.BindingListModelList

    searchObj.addSort("filName1", false);
    setSearchObj(searchObj);

    // Set the BindingListModel
    getPagedBindingListWrapper().init(searchObj, getListBoxOffice(), paging_OfficeList);
    BindingListModelList lml = (BindingListModelList) getListBoxOffice().getModel();
    setOffices(lml);

    // check if first time opened and init databinding for selectedBean
    if (getSelectedOffice() == null) {
      // init the bean with the first record in the List
      if (lml.getSize() > 0) {
        final int rowIndex = 0;
        // only for correct showing after Rendering. No effect as an
        // Event
        // yet.
        getListBoxOffice().setSelectedIndex(rowIndex);
        // get the first entry and cast them to the needed object
        setSelectedOffice((Office) lml.get(0));

        // call the onSelect Event for showing the objects data in the
        // statusBar
        Events.sendEvent(new Event("onSelect", getListBoxOffice(), getSelectedOffice()));
      }
View Full Code Here

Examples of org.zkoss.zkplus.databind.BindingListModelList

   * @param event
   */
  private void doSkip(Event event) {

    // get the model and the current selected record
    BindingListModelList blml = (BindingListModelList) getBranchListCtrl().getListBoxBranch().getModel();

    // check if data exists
    if (blml == null || blml.size() < 1)
      return;

    int index = blml.indexOf(getSelectedBranche());

    /**
     * Check, if all tabs with data binded components are created So we work
     * with spring BeanCreation we must check a little bit deeper, because
     * the Controller are preCreated ? After that, go back to the
     * current/selected tab.
     */
    Tab currentTab = tabbox_BranchMain.getSelectedTab();

    if (getBranchDetailCtrl().getBinder() == null) {
      Events.sendEvent(new Event(Events.ON_SELECT, tabBranchDetail, null));
    }

    // go back to selected tab
    currentTab.setSelected(true);

    // Check which button is clicked and calculate the rowIndex
    if (((ForwardEvent) event).getOrigin().getTarget() == btnNext) {
      if (index < (blml.size() - 1)) {
        index = index + 1;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnPrevious) {
      if (index > 0) {
        index = index - 1;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnFirst) {
      if (index != 0) {
        index = 0;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnLast) {
      if (index != blml.size()) {
        index = (blml.size() - 1);
      }
    }

    getBranchListCtrl().getListBoxBranch().setSelectedIndex(index);
    setSelectedBranche((Branche) blml.get(index));

    // call onSelect() for showing the objects data in the statusBar
    Events.sendEvent(new Event(Events.ON_SELECT, getBranchListCtrl().getListBoxBranch(), getSelectedBranche()));

    // refresh master-detail MASTERS data
View Full Code Here

Examples of org.zkoss.zkplus.databind.BindingListModelList

   * @param event
   */
  private void doSkip(Event event) {

    // get the model and the current selected record
    BindingListModelList blml = (BindingListModelList) getOfficeListCtrl().getListBoxOffice().getModel();

    // check if data exists
    if (blml == null || blml.size() < 1)
      return;

    int index = blml.indexOf(getSelectedOffice());

    /**
     * Check, if all tabs with data binded components are created So we work
     * with spring BeanCreation we must check a little bit deeper, because
     * the Controller are preCreated ? After that, go back to the
     * current/selected tab.
     */
    Tab currentTab = tabbox_OfficeMain.getSelectedTab();

    if (getOfficeDetailCtrl().getBinder() == null) {
      Events.sendEvent(new Event(Events.ON_SELECT, tabOfficeDetail, null));
    }

    // go back to selected tab
    currentTab.setSelected(true);

    // Check which button is clicked and calculate the rowIndex
    if (((ForwardEvent) event).getOrigin().getTarget() == btnNext) {
      if (index < (blml.size() - 1)) {
        index = index + 1;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnPrevious) {
      if (index > 0) {
        index = index - 1;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnFirst) {
      if (index != 0) {
        index = 0;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnLast) {
      if (index != blml.size()) {
        index = (blml.size() - 1);
      }
    }

    getOfficeListCtrl().getListBoxOffice().setSelectedIndex(index);
    setSelectedOffice((Office) blml.get(index));

    // call onSelect() for showing the objects data in the statusBar
    Events.sendEvent(new Event(Events.ON_SELECT, getOfficeListCtrl().getListBoxOffice(), getSelectedOffice()));

    // refresh master-detail MASTERS data
View Full Code Here

Examples of org.zkoss.zkplus.databind.BindingListModelList

    searchObj.addSort("braBezeichnung", false);
    setSearchObj(searchObj);

    // Set the BindingListModel
    getPagedBindingListWrapper().init(searchObj, getListBoxBranch(), pagingBranchList);
    final BindingListModelList lml = (BindingListModelList) getListBoxBranch().getModel();
    setBranches(lml);

    // check if first time opened and init databinding for selectedBean
    if (getSelectedBranche() == null) {
      // init the bean with the first record in the List
      if (lml.getSize() > 0) {
        final int rowIndex = 0;
        // only for correct showing after Rendering. No effect as an
        // Event
        // yet.
        getListBoxBranch().setSelectedIndex(rowIndex);
        // get the first entry and cast them to the needed object
        setSelectedBranche((Branche) lml.get(0));

        // call the onSelect Event for showing the objects data in the
        // statusBar
        Events.sendEvent(new Event("onSelect", getListBoxBranch(), getSelectedBranche()));
      }
View Full Code Here

Examples of org.zkoss.zkplus.databind.BindingListModelList

    searchObj.addSort("artNr", false);
    setSearchObj(this.searchObj);

    // Set the BindingListModel
    getPagedBindingListWrapper().init(searchObj, getListBoxArticle(), paging_ArticleList);
    BindingListModelList lml = (BindingListModelList) getListBoxArticle().getModel();
    setArticles(lml);

    // Now we would select and show the text of the first entry in the list.
    // We became not the first item FROM the listbox because it's NOT
    // RENDERED AT THIS TIME.
    // So we take the first entry from the MODEL (ListModelList) and set as
    // selected.
    // check if first time opened and init databinding for selectedBean
    if (getSelectedArticle() == null) {
      // init the bean with the first record in the List
      if (lml.getSize() > 0) {
        final int rowIndex = 0;
        // only for correct showing after Rendering. No effect as an
        // Event
        // yet.
        getListBoxArticle().setSelectedIndex(rowIndex);
        // get the first entry and cast them to the needed object
        setSelectedArticle((Article) lml.get(0));

        // call the onSelect Event for showing the objects data in the
        // statusBar
        Events.sendEvent(new Event("onSelect", getListBoxArticle(), getSelectedArticle()));
      }
View Full Code Here

Examples of org.zkoss.zkplus.databind.BindingListModelList

   * @param event
   */
  private void doSkip(Event event) {

    // get the model and the current selected record
    BindingListModelList blml = (BindingListModelList) getArticleListCtrl().getListBoxArticle().getModel();

    // check if data exists
    if (blml == null || blml.size() < 1)
      return;

    int index = blml.indexOf(getSelectedArticle());

    /**
     * Check, if all tabs with data binded components are created So we work
     * with spring BeanCreation we must check a little bit deeper, because
     * the Controller are preCreated ? After that, go back to the
     * current/selected tab.
     */
    Tab currentTab = tabbox_ArticleMain.getSelectedTab();

    if (getArticleDetailCtrl().getBinder() == null) {
      Events.sendEvent(new Event(Events.ON_SELECT, tabArticleDetail, null));
    }

    // go back to selected tab
    currentTab.setSelected(true);

    // Check which button is clicked and calculate the rowIndex
    if (((ForwardEvent) event).getOrigin().getTarget() == btnNext) {
      if (index < (blml.size() - 1)) {
        index = index + 1;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnPrevious) {
      if (index > 0) {
        index = index - 1;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnFirst) {
      if (index != 0) {
        index = 0;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnLast) {
      if (index != blml.size()) {
        index = (blml.size() - 1);
      }
    }

    getArticleListCtrl().getListBoxArticle().setSelectedIndex(index);
    setSelectedArticle((Article) blml.get(index));

    // call onSelect() for showing the objects data in the statusBar
    Events.sendEvent(new Event(Events.ON_SELECT, getArticleListCtrl().getListBoxArticle(), getSelectedArticle()));

    // refresh master-detail MASTERS data
View Full Code Here

Examples of org.zkoss.zkplus.databind.BindingListModelList

   
    LinkedList<String> categoryArys = new LinkedList<String>();
    categoryArys.add(ALL);
    categoryArys.addAll(formulaInfos.keySet());
    categoryCombobox.setModel(
        new BindingListModelList(categoryArys, false));
    categoryCombobox.addEventListener("onAfterRender", new EventListener() {
      public void onEvent(Event event) throws Exception {
        categoryCombobox.setSelectedIndex(0);
        initFunctionListbox();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.