Examples of LabelValue


Examples of com.pe.pgn.clubpgn.model.LabelValue

                sb.append("    <option value=\"\" selected=\"selected\">");
                sb.append(eval.evalString("prompt", prompt) + "</option>\n");
            }

            for (Iterator i = countries.iterator(); i.hasNext();) {
                LabelValue country = (LabelValue) i.next();
                sb.append("    <option value=\"" + country.getValue() + "\"");

                if ((selected != null) && selected.equals(country.getValue())) {
                    sb.append(" selected=\"selected\"");
                }

                sb.append(">" + country.getLabel() + "</option>\n");
            }

            sb.append("</select>");

            try {
View Full Code Here

Examples of com.pe.pgn.clubpgn.model.LabelValue

        for (int i = 0; i < available.length; i++) {
            final String iso = available[i].getCountry();
            final String name = available[i].getDisplayCountry(locale);

            if (!EMPTY.equals(iso) && !EMPTY.equals(name)) {
                LabelValue country = new LabelValue(name, iso);

                if (!countries.contains(country)) {
                    countries.add(new LabelValue(name, iso));
                }
            }
        }

        Collections.sort(countries, new LabelValueComparator(locale));
View Full Code Here

Examples of com.pe.pgn.clubpgn.model.LabelValue

         * @param o2 The second LabelValue to compare.
         *
         * @return The value returned by comparing the localized labels.
         */
        public final int compare(Object o1, Object o2) {
            LabelValue lhs = (LabelValue) o1;
            LabelValue rhs = (LabelValue) o2;

            return c.compare(lhs.getLabel(), rhs.getLabel());
        }
View Full Code Here

Examples of com.pe.pgn.clubpgn.model.LabelValue

    public List<LabelValue> getAllRoles() {
        List<Role> roles = dao.getRoles();
        List<LabelValue> list = new ArrayList<LabelValue>();

        for (Role role1 : roles) {
            list.add(new LabelValue(role1.getName(), role1.getName()));
        }

        return list;
    }
View Full Code Here

Examples of com.vst.model.internal.LabelValue

    if (this.roles != null) {
      for (Iterator it = roles.iterator(); it.hasNext();) {
        Role role = (Role) it.next();

        // convert the user's roles to LabelValue Objects
        userRoles.add(new LabelValue(role.getName(), role.getName()));
      }
    }

    return userRoles;
  }
View Full Code Here

Examples of com.vst.model.internal.LabelValue

                sb.append("    <option value=\"\" selected=\"selected\">");
                sb.append(eval.evalString("prompt", prompt) + "</option>\n");
            }

            for (Iterator i = countries.iterator(); i.hasNext();) {
                LabelValue country = (LabelValue) i.next();
                sb.append("    <option value=\"" + country.getValue() + "\"");

                if ((selected != null) && selected.equals(country.getValue())) {
                    sb.append(" selected=\"selected\"");
                }

                sb.append(">" + country.getLabel() + "</option>\n");
            }

            sb.append("</select>");

            try {
View Full Code Here

Examples of com.vst.model.internal.LabelValue

        for (int i = 0; i < available.length; i++) {
            final String iso = available[i].getCountry();
            final String name = available[i].getDisplayCountry(locale);

            if (!EMPTY.equals(iso) && !EMPTY.equals(name)) {
                LabelValue country = new LabelValue(name, iso);

                if (!countries.contains(country)) {
                    countries.add(new LabelValue(name, iso));
                }
            }
        }

        Collections.sort(countries, new LabelValueComparator(locale));
View Full Code Here

Examples of com.vst.model.internal.LabelValue

         * @param o2 The second LabelValue to compare.
         *
         * @return The value returned by comparing the localized labels.
         */
        public final int compare(Object o1, Object o2) {
            LabelValue lhs = (LabelValue) o1;
            LabelValue rhs = (LabelValue) o2;

            return c.compare(lhs.getLabel(), rhs.getLabel());
        }
View Full Code Here

Examples of com.vst.model.internal.LabelValue

        List list = new ArrayList();
        Role role = null;

        for (int i = 0; i < roles.size(); i++) {
            role = (Role) roles.get(i);
            list.add(new LabelValue(role.getName(), role.getName()));
        }

        return list;
    }
View Full Code Here

Examples of com.vst.model.internal.LabelValue

   
    public static Map convertListToMap(List list) {
        Map map = new LinkedHashMap();
       
        for (Iterator it = list.iterator(); it.hasNext();) {
            LabelValue option = (LabelValue) it.next();
            map.put(option.getLabel(), option.getValue());
        }
       
        return map;
    }
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.