Examples of LabelValueBean


Examples of org.apache.struts.util.LabelValueBean

        Iterator i = employeeList.iterator();
        while (i.hasNext()) {
          Object employeeObject = i.next();
         
          if (employeeObject instanceof LabelValueBean) {
            LabelValueBean employee = (LabelValueBean) employeeObject;
            Long employeeId = new Long(employee.getValue());
            if (vecview.contains(employeeId)) {
              i.remove();
              colview.add(employee);
            } else if (vecmodify.contains(employeeId)) {
              i.remove();
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

      {
        PrintTemplateVO ptVO = new PrintTemplateVO();
        HashMap hm = (HashMap)it.next();
        name = (String)hm.get("ptname");
        Number detailId = (Number)hm.get("ptdetailid");
        list.add(new LabelValueBean(name, detailId.toString()));
      }
    } catch (Exception e) {
      logger.error("[getallPrintTemplate] Exception thrown.", e);
    } finally {
      dl.destroy();
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

      while (it.hasNext())
      {
        HashMap category = (HashMap)it.next();
        String name = (String)category.get("name");
        Number id = (Number)category.get("id");
        categories.add(new LabelValueBean(name, String.valueOf(id)));
      }
    } finally {
      cvdl.destroy();
      cvdl = null;
    }
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

      Iterator i = results.iterator();
      while (i.hasNext()) {
        HashMap row = (HashMap)i.next();
        Number employeeId = (Number)row.get("employeeId");
        String name = (String)row.get("name");
        employeeList.add(new LabelValueBean(name, employeeId.toString()));
      }
    } finally {
      cvdl.destroy();
      cvdl = null;
    }
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

    public void rebuild(SessionInfo session) {
        availableValues = new ArrayList<LabelValueBean>(dataSource.getValues(session));
        selectedValues = new ArrayList<LabelValueBean>();
        availableMap = new HashMap<String, LabelValueBean>();
        for(Iterator i = availableValues.iterator(); i.hasNext(); ) {
            LabelValueBean lvb = (LabelValueBean)i.next();
            availableMap.put(lvb.getValue(), lvb);
        }
        for(Iterator i = propertyList.iterator(); i.hasNext(); ) {
            String v = (String)i.next();
            LabelValueBean lvb = (LabelValueBean)availableMap.get(v);
            if(lvb != null) {
                selectedValues.add(lvb);
                availableValues.remove(lvb);
                availableMap.remove(lvb.getValue());
            }
        }
    }
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

        reader = new BufferedReader(new InputStreamReader(new FileInputStream(f)));
       
        list = new ArrayList();
        String cipher;
        while((cipher = reader.readLine())!=null) {
          list.add(new LabelValueBean(cipher, cipher));
        }
        return list;
      } finally {
        if(reader!=null)
          reader.close();
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

     * @return selected values as property text
     */
    public String getAsPropertyText() {
        StringBuffer buf = new StringBuffer();
        for (Iterator i = selectedValues.iterator(); i.hasNext();) {
            LabelValueBean lvb = (LabelValueBean)i.next();
            if (buf.length() > 0) {
                buf.append("!");
            }
            buf.append(lvb.getValue().replaceAll("\\!", "!!"));
        }
        return buf.toString();
    }
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

        notHiddenAvailableValues = notHiddenDataSource == null ? Collections.<LabelValueBean>emptyList() : new ArrayList<LabelValueBean>(notHiddenDataSource.getValues(session));
        selectedValues = new ArrayList<LabelValueBean>();
        availableMap = new HashMap<String, LabelValueBean>();
        Iterator i = (notHiddenAvailableValues.equals(Collections.<LabelValueBean>emptyList())) ? availableValues.iterator() : notHiddenAvailableValues.iterator();
        while(i.hasNext()) {
            LabelValueBean lvb = (LabelValueBean)i.next();
            availableMap.put(lvb.getValue(), lvb);
        }
        for(Iterator iter = propertyList.iterator(); iter.hasNext(); ) {
            String v = (String)iter.next();
            LabelValueBean lvb = (LabelValueBean)availableMap.get(v);
            if(lvb != null) {
                selectedValues.add(lvb);
                availableValues.remove(lvb);
                availableMap.remove(lvb.getValue());
            }
        }
    }
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

        if (value == null || ! ( value instanceof MultiSelectSelectionModel )) {
            throw new JspException("Model attributes must specify an instance of MultiSelectListDataSourceModel (" + value + ")");
        }
        MultiSelectSelectionModel model = (MultiSelectSelectionModel)value;
        for(Iterator i = model.getAvailableValues().iterator(); i.hasNext(); ) {
            LabelValueBean lvb = (LabelValueBean)i.next();
            results.append("<option value=\"");
            results.append(lvb.getValue());
            results.append("\">");
            results.append(getLocalisedLabel(lvb));
            results.append("</option>");
        }
        results.append("</select>");
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

        if (value == null || ! ( value instanceof MultiSelectSelectionModel )) {
            throw new JspException("Model attributes must specify an instance of MultiSelectListDataSourceModel (" + value + ")");
        }
        MultiSelectSelectionModel model = (MultiSelectSelectionModel)value;
        for(Iterator i = model.getSelectedValues().iterator(); i.hasNext(); ) {
            LabelValueBean lvb = (LabelValueBean)i.next();
            results.append("<option value=\"");
            results.append(lvb.getValue());
            results.append("\">");
            results.append(getLocalisedLabel(lvb));
            results.append("</option>");
        }
        results.append("</select>");
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.