Package org.exoplatform.webui.form

Examples of org.exoplatform.webui.form.UIFormSelectBox


        for (String key : keys) {
            if (key.equalsIgnoreCase("user.gender")) {
                List<SelectItemOption<String>> ls = new ArrayList<SelectItemOption<String>>();
                ls.add(new SelectItemOption<String>(MALE, MALE));
                ls.add(new SelectItemOption<String>(FEMALE, FEMALE));
                UIFormSelectBox genderSelectBox = new UIFormSelectBox(key, key, ls);
                set.addUIFormInput(genderSelectBox);
                continue;
            } else if (key.equalsIgnoreCase("user.jobtitle")) {
                set.addUIFormInput(new UIFormStringInput(key, null, null).addValidator(UserConfigurableValidator.class,
                        JOB_TITLE, UserConfigurableValidator.KEY_PREFIX + JOB_TITLE, false));
                continue;
            } else if (key.equalsIgnoreCase(Constants.USER_LANGUAGE)) {
                UIFormSelectBox langSelectBox = new UIFormSelectBox(key, key, null);
                set.addUIFormInput(langSelectBox);
                initLanguageCombo(langSelectBox);
                continue;
            }
            set.addUIFormInput(new UIFormStringInput(key, null, null));
View Full Code Here


    /**
     * Update language select box
     */
    @Override
    public void processRender(WebuiRequestContext context) throws Exception {
        UIFormSelectBox langSelectBox = this.findComponentById(Constants.USER_LANGUAGE);
        initLanguageCombo(langSelectBox);
        super.processRender(context);
    }
View Full Code Here

                .addValidator(MandatoryValidator.class));
        inputSet.addUIFormInput(new UIFormDateTimeInput(DATE_OF_BIRTH, null, new Date()));
        inputSet.addUIFormInput(new UIFormTextAreaInput(DESCRIPTION, null, ""));

        List<SelectItemOption<String>> selectItemOptions = makeSelectItemOptions();
        inputSet.addUIFormInput(new UIFormSelectBox(POSITION, null, selectItemOptions));
        inputSet.addUIFormInput(new UICheckBoxInput(RECEIVE_EMAIL, null, false));

        List<SelectItemOption<String>> comboBoxItemOptions = new ArrayList<SelectItemOption<String>>();
        comboBoxItemOptions.add(new SelectItemOption<String>(("VI")));
        comboBoxItemOptions.add(new SelectItemOption<String>(("UK")));
View Full Code Here

   private boolean multi = true;

   public UIUserSelector() throws Exception
   {
      addUIFormInput(new UIFormStringInput(FIELD_KEYWORD, FIELD_KEYWORD, null));
      addUIFormInput(new UIFormSelectBox(FIELD_FILTER, FIELD_FILTER, getFilters()));
      addUIFormInput(new UIFormStringInput(FIELD_GROUP, FIELD_GROUP, null));
      isShowSearch_ = true;
      OrganizationService service = getApplicationComponent(OrganizationService.class);
      ObjectPageList objPageList = new ObjectPageList(service.getUserHandler().findUsers(new Query()).getAll(), 10);
      uiIterator_ = new UIPageIterator();
View Full Code Here

         if (key.equalsIgnoreCase("user.gender"))
         {
            List<SelectItemOption<String>> ls = new ArrayList<SelectItemOption<String>>();
            ls.add(new SelectItemOption<String>(MALE, MALE));
            ls.add(new SelectItemOption<String>(FEMALE, FEMALE));;
            UIFormSelectBox genderSelectBox = new UIFormSelectBox(key, key, ls);
            set.addUIFormInput(genderSelectBox);
            continue;
         }
         else if (key.equalsIgnoreCase("user.language"))
         {
            UIFormSelectBox langSelectBox = new UIFormSelectBox(key, key, null);
            set.addUIFormInput(langSelectBox);
            initLanguageCombo(langSelectBox);
            continue;
         }
         set.addUIFormInput(new UIFormStringInput(key, null, null));
View Full Code Here

    * Update language select box
    */
   @Override
   public void processRender(WebuiRequestContext context) throws Exception
   {
      UIFormSelectBox langSelectBox = this.findComponentById("user.language");
      initLanguageCombo(langSelectBox);
      super.processRender(context);
   }
View Full Code Here

                .addValidator(StringLengthValidator.class, 3, 30).addValidator(IdentifierValidator.class).setReadOnly(true));

        uiSettingSet.addUIFormInput(new UIFormStringInput(FIELD_LABEL, FIELD_LABEL, null)
                .addValidator(SpecialCharacterValidator.class));
        uiSettingSet.addUIFormInput(new UIFormStringInput(FIELD_DESCRIPTION, FIELD_DESCRIPTION, null));
        uiSettingSet.addUIFormInput(new UIFormSelectBox(FIELD_LOCALE, FIELD_LOCALE, languages)
                .addValidator(MandatoryValidator.class));

        List<SelectItemOption<String>> listSkin = new ArrayList<SelectItemOption<String>>();
        SkinService skinService = getApplicationComponent(SkinService.class);
        List<String> skinNames = new ArrayList<String>(skinService.getAvailableSkinNames());
        Collections.sort(skinNames);
        for (String skin : skinNames) {
            SelectItemOption<String> skinOption = new SelectItemOption<String>(skin, skin);
            listSkin.add(skinOption);
        }
        listSkin.get(0).setSelected(true);

        UIFormSelectBox uiSelectBox = new UIFormSelectBox(FIELD_SKIN, FIELD_SKIN, listSkin);
        uiSettingSet.addUIFormInput(uiSelectBox);

        addUIFormInput(uiSettingSet);

        // add to properties tab
        List<SelectItemOption<String>> listSessionAlive = new ArrayList<SelectItemOption<String>>();
        listSessionAlive.add(new SelectItemOption<String>(PortalProperties.SESSION_ALWAYS, PortalProperties.SESSION_ALWAYS));
        listSessionAlive.add(new SelectItemOption<String>(PortalProperties.SESSION_ON_DEMAND,
                PortalProperties.SESSION_ON_DEMAND));
        listSessionAlive.add(new SelectItemOption<String>(PortalProperties.SESSION_NEVER, PortalProperties.SESSION_NEVER));
        UIFormSelectBox uiSessionAliveBox = new UIFormSelectBox(FIELD_SESSION_ALIVE, FIELD_SESSION_ALIVE, listSessionAlive);
        uiSessionAliveBox.setValue(PortalProperties.SESSION_ON_DEMAND);
        uiPropertiesSet.addUIFormInput(uiSessionAliveBox);

        // TODO add more box for showPortletMode and showWindowState if needed
        UIFormCheckBoxInput<Boolean> uiShowInfobarBox = new UIFormCheckBoxInput<Boolean>(FIELD_SHOW_INFOBAR,
                FIELD_SHOW_INFOBAR, true);
        uiShowInfobarBox.setOnChange("CheckShowInfobar");
        uiPropertiesSet.addChild(uiShowInfobarBox);

        UIFormStringInput uiViewportInput = new UIFormStringInput(FIELD_VIEWPORT, FIELD_VIEWPORT, null);
        uiViewportInput.setReadOnly(false);
        uiPropertiesSet.addChild(uiViewportInput);

        addUIFormInput(uiPropertiesSet);

        List<SelectItemOption<String>> listSharedLayout = new ArrayList<SelectItemOption<String>>();
        listSharedLayout.add(new SelectItemOption<String>(PortalProperties.SHARED_LAYOUT_ALL, PortalProperties.SHARED_LAYOUT_ALL));
        listSharedLayout.add(new SelectItemOption<String>(PortalProperties.SHARED_LAYOUT_ADMINS, PortalProperties.SHARED_LAYOUT_ADMINS));
        UIFormSelectBox sharedLayoutSelectBox = new UIFormSelectBox(FIELD_SHARED_LAYOUT, FIELD_SHARED_LAYOUT, listSharedLayout);
        sharedLayoutSelectBox.setValue(PortalProperties.SHARED_LAYOUT_ALL);
        uiPropertiesSet.addUIFormInput(sharedLayoutSelectBox);

        UIFormInputSet uiPermissionSetting = createUIComponent(UIFormInputSet.class, "PermissionSetting", null);
        addUIComponentInput(uiPermissionSetting);
View Full Code Here

TOP

Related Classes of org.exoplatform.webui.form.UIFormSelectBox

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.