Package org.apache.struts.util

Examples of org.apache.struts.util.LabelValueBean


            return new ActionForward("/showLogon.do");
        } else {
            List<LabelValueBean> l = new ArrayList<LabelValueBean>();
            for (Iterator i = logonStateMachine.getAuthSchemes().iterator(); i.hasNext();) {
                AuthenticationScheme seq = (DefaultAuthenticationScheme) i.next();
                LabelValueBean lvb = new LabelValueBean(seq.getResourceName(), String.valueOf(seq.getResourceId()));
                l.add(lvb);
            }
            logonStateMachine.setState(LogonStateAndCache.STATE_KNOWN_USERNAME_MULTIPLE_SCHEMES_SELECT);
            ((SchemeSelectionForm) form).setAuthenticationSchemes(l);
            return mapping.findForward("success");
View Full Code Here


    try {
   
      Policy policy;
      for(Iterator it = PolicyDatabaseFactory.getInstance().getPoliciesExcludePersonal(session.getRealm()).iterator(); it.hasNext();) {
        policy = (Policy)it.next();
        l.add(new LabelValueBean(policy.getResourceName(), String.valueOf(policy.getResourceId())));
      }
    } catch(Exception ex) {
      log.error("Error obtaining policies for data source", ex);
    }
   
View Full Code Here

    try {
   
      Policy policy;
      for(Iterator it = PolicyDatabaseFactory.getInstance().getPolicies(session.getUser().getRealm()).iterator(); it.hasNext();) {
        policy = (Policy)it.next();
                l.add(new LabelValueBean(policy.getResourceName(), String.valueOf(policy.getResourceId())));
      }
    } catch(Exception ex) {
      log.error("Error obtaining policies for data source", ex);
    }
   
View Full Code Here

    public ThemesMultiSelectListDataSource() {
    }

    public Collection<LabelValueBean> getValues(SessionInfo session) {
        ArrayList l = new ArrayList();
        l.add(new LabelValueBean("Default", "/theme/default"));
        return l;
    }
View Full Code Here

                    if (pol.getResourceId() == checkPolicy.getResourceId()) {
                        ok = false;
                    }
                }
                if (ok) {
                    l.add(new LabelValueBean(pol.getResourceName(), String.valueOf(pol.getResourceId())));
                }
                ok = true;
            }
        } catch (Exception e) {
            log.error("Failed to list policies.", e);
View Full Code Here

    public static List resourceListAsLabelValueBeanList(List resourceList) {
        List l = new ArrayList();
        Resource r;
        for (Iterator i = resourceList.iterator(); i.hasNext();) {
            r = (Resource) i.next();
            l.add(new LabelValueBean(r.getResourceName(), String.valueOf(r.getResourceId())));
        }
        return l;
    }
View Full Code Here

                if (buf.length() != 0) {
                    buf.append(")");
                }
                MessageResources mr = CoreUtil.getMessageResources(session.getHttpSession(), def.getMessageResourcesKey());
                l
                                .add(new LabelValueBean(
                                                mr == null ? ("!unknown bundle " + def.getMessageResourcesKey() + " in module definition")
                                                                : mr.getMessage("authenticationModule." + def.getName() + ".name")
                                                                                + buf.toString(), def.getName()));
            }
        }
View Full Code Here

        try {
            pol = PolicyDatabaseFactory.getInstance().getPolicies(session.getUser().getRealm());
            Policy p;
            for (Iterator i = pol.iterator(); i.hasNext();) {
                p = (Policy) i.next();
                l.add(new LabelValueBean(p.getResourceName(), String.valueOf(p.getResourceId())));
            }
        } catch (Exception e) {
        }
        return l;
    }
View Full Code Here

     */
    public Collection<LabelValueBean> getValues(SessionInfo session) {
        ArrayList l = new ArrayList();
        try {
            // TODO make this localised
            l.add(new LabelValueBean("All Interfaces",
                "0.0.0.0"));           
            for(Enumeration e = NetworkInterface.getNetworkInterfaces();
                e.hasMoreElements(); ) {
                NetworkInterface ni = (NetworkInterface)e.nextElement();
                for(Enumeration e2 = ni.getInetAddresses(); e2.hasMoreElements(); ) {
                    InetAddress addr = (InetAddress)e2.nextElement();
                    l.add(new LabelValueBean(addr.getHostAddress(),
                        addr.getHostAddress()));
                }               
            }
        }
        catch(Throwable t) {
View Full Code Here

  }
 
  public void initialise(List clientRestrictionItems) {
    this.clientRestrictionItems = clientRestrictionItems;
    osList = new ArrayList();
    osList.add(new LabelValueBean("All", "All"));
    selectedItems = new ArrayList();
    String lastOs = null;
    for(Iterator i  = clientRestrictionItems.iterator(); i.hasNext(); ) {
      ClientRestrictionItem item = (ClientRestrictionItem)i.next();
      if(!item.getClientRestriction().getOsName().equals(lastOs)) {
        lastOs = item.getClientRestriction().getOsName();
        osList.add(new LabelValueBean(lastOs, lastOs));
      }
    }
    buildSelectedList();
  }
View Full Code Here

TOP

Related Classes of org.apache.struts.util.LabelValueBean

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.