Package org.zkoss.zul

Examples of org.zkoss.zul.FieldComparator


        list.add(new SampleBean(label + " " + rand.nextInt(count),
            rand.nextInt(count), cal.getTime()));
        cal.add(Calendar.DAY_OF_MONTH, 1);
      }
     
      return new GroupsModelArray(list, new FieldComparator("name", true)) {
        protected Object createGroupHead(
            Object[] groupdata, int index, int col) {
          return new Object[] { groupdata[0], new Integer(col) };
        }
      };
View Full Code Here


    paging_OfficeList.setPageSize(getCountRows());
    paging_OfficeList.setDetailed(true);

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_OfficeList_No.setSortAscending(new FieldComparator("filNr", true));
    listheader_OfficeList_No.setSortDescending(new FieldComparator("filNr", false));
    listheader_OfficeList_Name1.setSortAscending(new FieldComparator("filName1", true));
    listheader_OfficeList_Name1.setSortDescending(new FieldComparator("filName1", false));
    listheader_OfficeList_Name2.setSortAscending(new FieldComparator("filName2", true));
    listheader_OfficeList_Name2.setSortDescending(new FieldComparator("filName2", false));
    listheader_OfficeList_City.setSortAscending(new FieldComparator("filOrt", true));
    listheader_OfficeList_City.setSortDescending(new FieldComparator("filOrt", false));

    // ++ create the searchObject and init sorting ++//
    // ++ create the searchObject and init sorting ++//
    searchObj = new HibernateSearchObject<Office>(Office.class, getCountRows());
    searchObj.addSort("filName1", false);
View Full Code Here

    borderLayout_Users.setHeight(String.valueOf(maxListBoxHeight - 5) + "px");
    borderLayout_Roles.setHeight(String.valueOf(maxListBoxHeight - 5) + "px");

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_SecUserRole_usrLoginname.setSortAscending(new FieldComparator("usrLoginname", true));
    listheader_SecUserRole_usrLoginname.setSortDescending(new FieldComparator("usrLoginname", false));

    // Assign the Comparator for sorting listbox secUserRolesList
    listheader_SecUserRole_RoleName.setSortAscending(new FieldComparator("rolShortdescription", true));
    listheader_SecUserRole_RoleName.setSortDescending(new FieldComparator("rolShortdescription", false));

    /* set the PageSize */
    paging_ListBoxSecUser.setPageSize(getCountRowsSecUser());
    paging_ListBoxSecUser.setDetailed(true);

 
View Full Code Here

    borderLayout_secUserList.setHeight(String.valueOf(maxListBoxHeight) + "px");

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_UserList_usrLoginname.setSortAscending(new FieldComparator("usrLoginname", true));
    listheader_UserList_usrLoginname.setSortDescending(new FieldComparator("usrLoginname", false));
    listheader_UserList_usrLoginname.setSortDirection("ascending");
    listheader_UserList_usrLastname.setSortAscending(new FieldComparator("usrLastname", true));
    listheader_UserList_usrLastname.setSortDescending(new FieldComparator("usrLastname", false));
    listheader_UserList_usrEmail.setSortAscending(new FieldComparator("usrEmail", true));
    listheader_UserList_usrEmail.setSortDescending(new FieldComparator("usrEmail", false));
    listheader_UserList_usrEnabled.setSortAscending(new FieldComparator("usrEnabled", true));
    listheader_UserList_usrEnabled.setSortDescending(new FieldComparator("usrEnabled", false));
    listheader_UserList_usrAccountnonexpired.setSortAscending(new FieldComparator("usrAccountnonexpired", true));
    listheader_UserList_usrAccountnonexpired.setSortDescending(new FieldComparator("usrAccountnonexpired", false));
    listheader_UserList_usrCredentialsnonexpired.setSortAscending(new FieldComparator("usrCredentialsnonexpired", true));
    listheader_UserList_usrCredentialsnonexpired.setSortDescending(new FieldComparator("usrCredentialsnonexpired", false));
    listheader_UserList_usrAccountnonlocked.setSortAscending(new FieldComparator("usrAccountnonlocked", true));
    listheader_UserList_usrAccountnonlocked.setSortDescending(new FieldComparator("usrAccountnonlocked", false));

    // set the paging params
    paging_UserList.setPageSize(getCountRows());
    paging_UserList.setDetailed(true);
View Full Code Here

    // init, show all rights
    checkbox_SecRightList_ShowAll.setChecked(true);

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_SecRightList_rigName.setSortAscending(new FieldComparator("rigName", true));
    listheader_SecRightList_rigName.setSortDescending(new FieldComparator("rigName", false));
    listheader_SecRightList_rigType.setSortAscending(new FieldComparator("rigType", true));
    listheader_SecRightList_rigType.setSortDescending(new FieldComparator("rigType", false));

    // ++++++++++++++ DropDown ListBox ++++++++++++++++++ //
    // set listModel and itemRenderer for the dropdown listbox
    lb_secRight_RightType.setModel(new ListModelList(getSecurityService().getAllTypes()));
    lb_secRight_RightType.setItemRenderer(new SecRightSecTypListModelItemRenderer());
View Full Code Here

    pagingBranchList.setPageSize(getCountRows());
    pagingBranchList.setDetailed(true);

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_BranchText.setSortAscending(new FieldComparator("braBezeichnung", true));
    listheader_BranchText.setSortDescending(new FieldComparator("braBezeichnung", false));

    // ++ create the searchObject and init sorting ++//
    // get customers and only their latest address
    searchObj = new HibernateSearchObject<Branche>(Branche.class, getCountRows());
    searchObj.addSort("braBezeichnung", false);
View Full Code Here

    // secRolegroupWindow.setHeight((height - topHeader) + "px");

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    // Assign the Comparator for sorting listBoxSecRole
    listheader_SecRoleGroup_Rolename.setSortAscending(new FieldComparator("rolShortdescription", true));
    listheader_SecRoleGroup_Rolename.setSortDescending(new FieldComparator("rolShortdescription", false));

    // Assign the Comparator for sorting listBoxRoleGroups
    listheader_SecRoleGroup_GroupName.setSortAscending(new FieldComparator("grpShortdescription", true));
    listheader_SecRoleGroup_GroupName.setSortDescending(new FieldComparator("grpShortdescription", false));

    /* set the PageSize */
    paging_ListBoxSecRole.setPageSize(getCountRowsSecRole());
    paging_ListBoxSecRole.setDetailed(true);

 
View Full Code Here

    // init, show all rights
    checkbox_SecGroupList_ShowAll.setChecked(true);

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_SecGroupList_grpShortdescription.setSortAscending(new FieldComparator("grpShortdescription", true));
    listheader_SecGroupList_grpShortdescription.setSortDescending(new FieldComparator("grpShortdescription", false));
    listheader_SecGroupList_grpLongdescription.setSortAscending("");
    listheader_SecGroupList_grpLongdescription.setSortDescending("");

    // ++ create the searchObject and init sorting ++//
    HibernateSearchObject<SecGroup> soSecGroup = new HibernateSearchObject<SecGroup>(SecGroup.class, getCountRows());
View Full Code Here

    Messagebox.show("Client Local Name: " + str);
  }

  public void onClick$BtnSerializeFC(Event event) throws InterruptedException {

    FieldComparator fcOld;
    FieldComparator fcNew;

    fcOld = new FieldComparator("TestColumn", false);

    // Serialize the original class object
    try {
      final FileOutputStream fo = new FileOutputStream("cde.tmp");
      final ObjectOutputStream so = new ObjectOutputStream(fo);
      so.writeObject(fcOld);
      so.flush();
      so.close();
    } catch (final Exception e) {
      throw new RuntimeException(e);
    }

    // Deserialize in to new class object
    try {
      final FileInputStream fi = new FileInputStream("cde.tmp");
      final ObjectInputStream si = new ObjectInputStream(fi);
      fcNew = (FieldComparator) si.readObject();
      System.out.println(fcNew.getOrderBy());
      si.close();
    } catch (final Exception e) {
      throw new RuntimeException(e);
    }
View Full Code Here

    paging_ListBoxSingleRightSearch.setPageSize(this.countRowsSecRight);
    paging_ListBoxSingleRightSearch.setDetailed(true);

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_bbox_AddGroupRightDialog_RightName.setSortAscending(new FieldComparator("rigName", true));
    listheader_bbox_AddGroupRightDialog_RightName.setSortDescending(new FieldComparator("rigName", false));
    listheader_bbox_AddGroupRightDialog_RightType.setSortAscending(new FieldComparator("rigType", true));
    listheader_bbox_AddGroupRightDialog_RightType.setSortDescending(new FieldComparator("rigType", false));

    // temporary, cause the security is not implemented for this controller
    btnEdit.setVisible(false);
    btnCancel.setVisible(false);
    btnDelete.setVisible(false);
View Full Code Here

TOP

Related Classes of org.zkoss.zul.FieldComparator

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.