Package org.zkoss.zul

Examples of org.zkoss.zul.ListModelList


    /* if a language is selected get the object from the listbox */
    Listitem item = lbox_usrLocale.getSelectedItem();

    if (item != null) {
      ListModelList lml1 = (ListModelList) lbox_usrLocale.getListModel();
      Language lang = (Language) lml1.get(item.getIndex());
      anUser.setUsrLocale(lang.getLanLocale());
    }

    // save it to database
    try {
      getUserService().saveOrUpdate(anUser);
    } catch (DataAccessException e) {
      ZksampleMessageUtils.showErrorMessage(e.getMostSpecificCause().toString());

      // Reset to init values
      doResetInitValues();

      doReadOnly();
      btnCtrl.setBtnStatus_Save();
      return;
    }

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

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

    doReadOnly();
    btnCtrl.setBtnStatus_Save();
    // init the old values vars new
View Full Code Here


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

        // now synchronize the listBox
        final ListModelList lml = (ListModelList) listBoxSecRoles.getListModel();

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

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

      btnCtrl.setBtnStatus_Save();
      return;
    }

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

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

    doReadOnly();
    btnCtrl.setBtnStatus_Save();
View Full Code Here

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

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

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

        secGroupDialogWindow.onClose(); // close
      }
    }
View Full Code Here

      btnCtrl.setBtnStatus_Save();
      return;
    }

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

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

    doReadOnly();
    btnCtrl.setBtnStatus_Save();
View Full Code Here

  /**
   * Gets all logins for success.
   */
  public void updateList() {
    this.listBoxSecUserlog.setModel(new ListModelList(getLoginLoggingService().getAllLogsServerPushForSuccess()));
  }
View Full Code Here

  /**
   * Gets all logins for failed.
   */
  public void updateList2() {
    this.listBoxSecUserlog.setModel(new ListModelList(getLoginLoggingService().getAllLogsServerPushForFailed()));
  }
View Full Code Here

    for (int i = 0; i < 48; i++) {
      dateTime.add(sdf.format(calendar.getTime()));
      calendar.add(Calendar.MINUTE, 30);
    }
    ppbt.setModel(new ListModelList(dateTime));
    ppet.setModel(new ListModelList(dateTime));

    CalendarsEvent evt = getEditEvent();

    int left = evt.getX();
    int top = evt.getY();
View Full Code Here

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

        // now synchronize the branches listBox
        final ListModelList lml = (ListModelList) listbox_GuestBookList.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(guestBook) == -1) {
        } else {
          lml.remove(lml.indexOf(guestBook));
        }

        window_GuestBookDialog.onClose(); // close
      } // deleteBranch()
    }
View Full Code Here

      return;
    }

    // now synchronize the branches listBox
    ListModelList lml = (ListModelList) this.listbox_GuestBookList.getListModel();

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

    doReadOnly();

    // manually settings
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.