Examples of LabelValueBean


Examples of org.apache.struts.util.LabelValueBean

                Collection<Permission> permissions = type.getPermissions();
                for (Permission permission : permissions) {
                    String permissionString = CoreUtil.getMessageResources(sessionInfo.getHttpSession(), permission.getBundle()).getMessage("permission." + permission.getId() + ".title").trim();
                    String resourceTypeString = CoreUtil.getMessageResources(sessionInfo.getHttpSession(), type.getBundle()).getMessage("resourceType." + type.getResourceTypeId() + ".title").trim();
                    String lableString = resourceTypeString + " " + permissionString;
                    l.add(new LabelValueBean(lableString, lableString));
                }
            }
        } catch (Exception e) {
        }
        return l;
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

                    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

Examples of org.apache.struts.util.LabelValueBean

        colorList.add("Violet");
        request.setAttribute("colorCollection", colorList);

        /* A Collection of LabelValue beans */
        ArrayList days = new ArrayList();
        days.add(new LabelValueBean("Monday", "1"));
        days.add(new LabelValueBean("Tuesday", "2"));
        days.add(new LabelValueBean("Wednesday", "3"));
        days.add(new LabelValueBean("Thursday", "4"));
        days.add(new LabelValueBean("Friday", "5"));
        days.add(new LabelValueBean("Saturday", "6"));
        days.add(new LabelValueBean("Sunday", "7"));
        request.setAttribute("days", days);

        /* Collection of custom beans */
        ArrayList books = new ArrayList();
        books.add(new BookBean("0596003285", "Programming Jakarta Struts"));
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

     */
    protected void setupCache(ActionServlet servlet, ModuleConfig config) {

        // Set up list of server types under "serverTypes"
        ArrayList serverTypes = new ArrayList();
        serverTypes.add(new LabelValueBean("IMAP Protocol", "imap"));
        serverTypes.add(new LabelValueBean("POP3 Protocol", "pop3"));
        servlet.getServletContext().setAttribute("serverTypes", serverTypes);

    }
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

    public Collection getBeanCollection() {
        if (beanCollection == null) {
            Vector entries = new Vector(10);

            entries.add(new LabelValueBean("Label 0", "Value 0"));
            entries.add(new LabelValueBean("Label 1", "Value 1"));
            entries.add(new LabelValueBean("Label 2", "Value 2"));
            entries.add(new LabelValueBean("Label 3", "Value 3"));
            entries.add(new LabelValueBean("Label 4", "Value 4"));
            entries.add(new LabelValueBean("Label 5", "Value 5"));
            entries.add(new LabelValueBean("Label 6", "Value 6"));
            entries.add(new LabelValueBean("Label 7", "Value 7"));
            entries.add(new LabelValueBean("Label 8", "Value 8"));
            entries.add(new LabelValueBean("Label 9", "Value 9"));

            beanCollection = entries;
        }

        return (beanCollection);
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

  public List<LabelValueBean> buildSearchOptions(String hasDormitory, Boolean adminMenu){
    AppProp appProp = AppProp.getInstance();
   
       // Admin Search Category
       List<LabelValueBean> searchCategory = new ArrayList<LabelValueBean>();
       searchCategory.add(new LabelValueBean(appProp.getValue("label.fullsearch"), BaseConstants.FULL_SEARCH));
      
       if (adminMenu){
         searchCategory.add(new LabelValueBean(appProp.getValue("label.username"), BaseConstants.USERNAME));
         searchCategory.add(new LabelValueBean(appProp.getValue("label.email"), BaseConstants.EMAIL));
       }
      
       searchCategory.add(new LabelValueBean(appProp.getValue("label.firstname"), BaseConstants.FIRST_NAME));
       searchCategory.add(new LabelValueBean(appProp.getValue("label.lastname"), BaseConstants.LAST_NAME));
       if (hasDormitory != null && hasDormitory.equalsIgnoreCase(BaseConstants.BOOLEAN_YES)){
         searchCategory.add(new LabelValueBean(appProp.getValue("label.dormitory"), BaseConstants.DORMITORY));
       }    
       searchCategory.add(new LabelValueBean(appProp.getValue("label.yearin"), BaseConstants.YEAR_IN));
       searchCategory.add(new LabelValueBean(appProp.getValue("label.yearout"), BaseConstants.YEAR_OUT));
       searchCategory.add(new LabelValueBean(appProp.getValue("label.nickname"), BaseConstants.NICK_NAME));
       searchCategory.add(new LabelValueBean(appProp.getValue("label.marriedname"), BaseConstants.MARRIED_NAME));
       searchCategory.add(new LabelValueBean(appProp.getValue("label.namebeforemarriage"), BaseConstants.MAIDEN_NAME));
       searchCategory.add(new LabelValueBean(appProp.getValue("label.gender"), BaseConstants.GENDER));
       searchCategory.add(new LabelValueBean(appProp.getValue("label.avatar"), BaseConstants.AVATAR));
      
       return searchCategory;
  }
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

    // --------------------------------------------------

    // Gender
    List<LabelValueBean> gender = new ArrayList<LabelValueBean>();
    gender.add(new LabelValueBean(appProp.getValue("label.male"),
        BaseConstants.GENDER_MALE));
    gender.add(new LabelValueBean(appProp.getValue("label.female"),
        BaseConstants.GENDER_FEMALE));
    gender.add(new LabelValueBean(appProp.getValue("label.unknown"),
        BaseConstants.GENDER_UNKNOWN));
    getServletContext().setAttribute(BaseConstants.LIST_OF_GENDER_OPTIONS,
        gender);

    // Search Category
    List<LabelValueBean> adminAction = new ArrayList<LabelValueBean>();
    adminAction.add(new LabelValueBean(BaseConstants.ADMIN_ACTION_DELETE,
        BaseConstants.ADMIN_ACTION_DELETE));
    adminAction.add(new LabelValueBean(BaseConstants.ADMIN_ACTION_ACTIVATE,
        BaseConstants.ADMIN_ACTION_ACTIVATE));
    adminAction.add(new LabelValueBean(BaseConstants.ADMIN_ACTION_MODIFY,
        BaseConstants.ADMIN_ACTION_MODIFY));
    adminAction.add(new LabelValueBean(
        BaseConstants.ADMIN_ACTION_DEACTIVATE,
        BaseConstants.ADMIN_ACTION_DEACTIVATE));
    adminAction.add(new LabelValueBean(BaseConstants.ADMIN_ACTION_LOCK,
        BaseConstants.ADMIN_ACTION_LOCK));
    getServletContext().setAttribute(BaseConstants.LIST_OF_ADMIN_OPTIONS,
        adminAction);

    // Approval Category
    List<LabelValueBean> approvalAction = new ArrayList<LabelValueBean>();
    approvalAction.add(new LabelValueBean(BaseConstants.MODIFY_IT,
        BaseConstants.MODIFY_IT));
    approvalAction.add(new LabelValueBean(BaseConstants.APPROVE_IT,
        BaseConstants.APPROVE_IT));
    approvalAction.add(new LabelValueBean(BaseConstants.DEACTIVATE_IT,
        BaseConstants.DEACTIVATE_IT));
    approvalAction.add(new LabelValueBean(BaseConstants.DECLINE_IT,
        BaseConstants.DECLINE_IT));
    approvalAction.add(new LabelValueBean(BaseConstants.DELETE_IT,
        BaseConstants.DELETE_IT));
    getServletContext().setAttribute(
        BaseConstants.LIST_OF_APPROVAL_OPTIONS, approvalAction);

    // Account Status
    List<LabelValueBean> accountStatus = new ArrayList<LabelValueBean>();
    accountStatus.add(new LabelValueBean(appProp
        .getValue("label.statusactive"), BaseConstants.ACCOUNT_ACTIVE));
    accountStatus.add(new LabelValueBean(appProp
        .getValue("label.accountdeactivated"),
        BaseConstants.ACCOUNT_DEACTIVATED));
    accountStatus
        .add(new LabelValueBean(
            appProp.getValue("label.accountlocked"),
            BaseConstants.ACCOUNT_LOCKED));
    accountStatus
        .add(new LabelValueBean(appProp.getValue("label.accountnew"),
            BaseConstants.ACCOUNT_UNAPPROVED));
    getServletContext().setAttribute(BaseConstants.LOOKUP_ACCOUNT_STATUS,
        accountStatus);

    // Status
    List<LabelValueBean> status = new ArrayList<LabelValueBean>();
    status.add(new LabelValueBean(appProp.getValue("label.statusactive"),
        BaseConstants.ACTIVE));
    status.add(new LabelValueBean(appProp.getValue("label.statusinactive"),
        BaseConstants.INACTIVE));
    getServletContext().setAttribute(BaseConstants.LOOKUP_STATUS, status);

    logger.debug("Other Cache loaded...");
  }
View Full Code Here

Examples of org.apache.struts.util.LabelValueBean

     */
    protected void setupCache(ActionServlet servlet, ModuleConfig config) {

        // Set up list of server types under "serverTypes"
        ArrayList serverTypes = new ArrayList();
        serverTypes.add(new LabelValueBean("IMAP Protocol", "imap"));
        serverTypes.add(new LabelValueBean("POP3 Protocol", "pop3"));
        servlet.getServletContext().setAttribute("serverTypes", serverTypes);

    }
View Full Code Here

Examples of org.apache.webapp.admin.LabelValueBean

        loggerTypes[1] = "SystemErrLogger";
        loggerTypes[2] = "SystemOutLogger";
       
        ArrayList types = new ArrayList();   
        // the first element in the select list should be the type selected
        types.add(new LabelValueBean(type,
                "/admin/AddLogger.do?parent=" + URLEncoder.encode(parent)
                + "&type=" + type));       
        for (int i=0; i< loggerTypes.length; i++) {
            if (!type.equalsIgnoreCase(loggerTypes[i])) {
                types.add(new LabelValueBean(loggerTypes[i],
                "/admin/AddLogger.do?parent=" + URLEncoder.encode(parent)
                + "&type=" + loggerTypes[i]));       
            }
        }
        loggerFm.setLoggerTypeVals(types);
View Full Code Here

Examples of org.apache.webapp.admin.LabelValueBean

                ((String) mBServer.getAttribute(ename, attribute));

            // Build the list of available hosts
            attribute = "hosts";
            ArrayList hosts = new ArrayList();
            hosts.add(new LabelValueBean
                      (resources.getMessage("list.none"), ""));
            Iterator items = Lists.getHosts(mBServer, sname).iterator();
            while (items.hasNext()) {
                ObjectName hname = new ObjectName((String) items.next());
                String name = hname.getKeyProperty("host");
                if (name!=null)
                    hosts.add(new LabelValueBean(name, name));
            }
            serviceFm.setHostNameVals(hosts);

        } catch (Throwable t) {
            getServlet().log
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.