Examples of UIFormSelectBox


Examples of org.exoplatform.webui.form.UIFormSelectBox

   public void quickSearch(UIFormInputSet quickSearchInput) throws Exception
   {
      Query query = new Query();
      UIFormStringInput input = (UIFormStringInput)quickSearchInput.getChild(0);
      UIFormSelectBox select = (UIFormSelectBox)quickSearchInput.getChild(1);
      String name = input.getValue();
      if (name == null || name.equals(""))
      {
         search(new Query());
         return;
      }
      if (name.indexOf("*") < 0)
      {
         if (name.charAt(0) != '*')
            name = "*" + name;
         if (name.charAt(name.length() - 1) != '*')
            name += "*";
      }
      name = name.replace('?', '_');
      String selectBoxValue = select.getValue();
      if (selectBoxValue.equals(USER_NAME))
         query.setUserName(name);
      if (selectBoxValue.equals(LAST_NAME))
         query.setLastName(name);
      if (selectBoxValue.equals(FIRST_NAME))
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

      addUIFormInput(new UIFormStringInput(FIELD_NAME, null, null).addValidator(StringLengthValidator.class, 3, 30));
      List<SelectItemOption<String>> types = new ArrayList<SelectItemOption<String>>(3);
      types.add(new SelectItemOption<String>(ApplicationType.PORTLET.getName()));
      types.add(new SelectItemOption<String>(ApplicationType.GADGET.getName()));
      types.add(new SelectItemOption<String>(ApplicationType.WSRP_PORTLET.getName()));
      UIFormSelectBox uiSelectBox = new UIFormSelectBox(FIELD_TYPE, null, types);
      uiSelectBox.setOnChange("ChangeType");
      addUIFormInput(uiSelectBox);
      String tableName = getClass().getSimpleName();
      UIFormTableIteratorInputSet uiTableInputSet = createUIComponent(UIFormTableIteratorInputSet.class, null, null);
      uiTableInputSet.setName(tableName);
      uiTableInputSet.setId(tableName);
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

   private String groupId;

   public UIGroupEditMembershipForm() throws Exception
   {
      addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME, null).setEditable(false));
      addUIFormInput(new UIFormSelectBox(MEMBER_SHIP, MEMBER_SHIP, listOption).setSize(1));
   }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

    }

    public static class ChangeOwnerTypeActionListener extends EventListener<UIPageForm> {
        public void execute(Event<UIPageForm> event) throws Exception {
            UIPageForm uiForm = event.getSource();
            UIFormSelectBox uiSelectBox = uiForm.getUIFormSelectBox(OWNER_TYPE);
            String ownerType = uiSelectBox.getValue();
            PortalRequestContext prContext = Util.getPortalRequestContext();
            UIFormInputSet uiSettingSet = uiForm.getChildById("PageSetting");
            uiForm.setSelectedTab("PageSetting");
            List<UIComponent> list = uiSettingSet.getChildren();
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

    }

    public static class ChangeOwnerIdActionListener extends EventListener<UIPageForm> {
        public void execute(Event<UIPageForm> event) throws Exception {
            UIPageForm uiForm = event.getSource();
            UIFormSelectBox uiSelectBox = uiForm.getUIFormSelectBox(OWNER_TYPE);
            String ownerType = uiSelectBox.getValue();
            if (PortalConfig.PORTAL_TYPE.equals(ownerType)) {
                String[] accessPermissions = {};
                String editPermission = "";
                String portalIdSelected = uiForm.portalIdSelectBox.getValue();
                UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

    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

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;
            }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

    /**
     * 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

Examples of org.exoplatform.webui.form.UIFormSelectBox

        UICheckBoxInput uiSwitchLabelMode = new UICheckBoxInput(SWITCH_MODE, null, true);
        uiDateInputCheck.setOnChange("SwitchPublicationDate");
        uiVisibleCheck.setOnChange("SwitchVisible");
        uiSwitchLabelMode.setOnChange(SWITCH_MODE_ONCHANGE);

        UIFormSelectBox uiFormLanguagesSelectBox = new UIFormSelectBox(LANGUAGES, null, null);
        initLanguageSelectBox(uiFormLanguagesSelectBox);
        uiFormLanguagesSelectBox.setOnChange(LANGUAGES_ONCHANGE);

        addChild(UIPageNodeSelector.class, null, null);
        addUIFormInput(new UIFormStringInput(PAGE_NAME, "name", null).addValidator(MandatoryValidator.class)
                .addValidator(StringLengthValidator.class, 3, 30).addValidator(IdentifierValidator.class));
        addUIFormInput(uiSwitchLabelMode);
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

                Collections.sort(groups);
                List<SelectItemOption<String>> groupsItem = new ArrayList<SelectItemOption<String>>();
                for (String group : groups) {
                    groupsItem.add(new SelectItemOption<String>(group));
                }
                groupIdSelectBox = new UIFormSelectBox(OWNER_ID, OWNER_ID, groupsItem);
                groupIdSelectBox.setOnChange("ChangeOwnerId");
                groupIdSelectBox.setParent(uiSettingSet);
            }
        }
    }
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.