Examples of UIFormSelectBox


Examples of org.exoplatform.webui.form.UIFormSelectBox

    public static class ChangeLanguageActionListener extends EventListener<UIPageNodeForm> {
        @Override
        public void execute(Event<UIPageNodeForm> event) throws Exception {
            UIPageNodeForm uiForm = event.getSource();
            UIFormSelectBox languageSelection = uiForm.getUIFormSelectBox(LANGUAGES);
            UIFormStringInput label = uiForm.getUIStringInput(I18N_LABEL);
            uiForm.updateCachedLabels(uiForm.getSelectedLocale(), label.getValue());

            uiForm.setSelectedLocale(languageSelection.getValue());
            label.setValue(uiForm.getLabelOnLocale(uiForm.getSelectedLocale()));
            event.getRequestContext().addUIComponentToUpdateByAjax(uiForm);
        }
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

        uiDateInputCheck.setOnChange("SwitchPublicationDate");
        uiVisibleCheck.setOnChange("SwitchVisible");
        uiSwitchLabelMode.setOnChange(SWITCH_MODE_ONCHANGE);

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

        uiSettingSet
                .addUIFormInput(new UIFormStringInput("URI", "URI", null).setDisabled(true))
                .addUIFormInput(
                        new UIFormStringInput("name", "name", null).addValidator(MandatoryValidator.class)
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

         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(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

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

   }

   public void quickSearch(UIFormInputSet quickSearchInput) throws Exception
   {
      UIFormStringInput input = (UIFormStringInput)quickSearchInput.getChild(0);
      UIFormSelectBox select = (UIFormSelectBox)quickSearchInput.getChild(1);
      String value = input.getValue();
      String selectBoxValue = select.getValue();
      Query<Page> query = new Query<Page>(null, null, null, null, Page.class);
      if (selectBoxValue.equals("title"))
         query.setTitle(value);
      else if (selectBoxValue.equals("ownerType"))
         query.setOwnerType(value);
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

         ownerTypes.add(new SelectItemOption<String>(PortalConfig.PORTAL_TYPE));
      }
      ownerIdInput = new UIFormStringInput(OWNER_ID, OWNER_ID, null);
      ownerIdInput.setEditable(false).setValue(pcontext.getRemoteUser());

      UIFormSelectBox uiSelectBoxOwnerType = new UIFormSelectBox(OWNER_TYPE, OWNER_TYPE, ownerTypes);
      uiSelectBoxOwnerType.setOnChange("ChangeOwnerType");

      UIFormInputSet uiSettingSet = new UIFormInputSet("PageSetting");
      uiSettingSet.addUIFormInput(new UIFormStringInput("pageId", "pageId", null).setEditable(false)).addUIFormInput(
         uiSelectBoxOwnerType).addUIFormInput(ownerIdInput).addUIFormInput(
         new UIFormStringInput("name", "name", null).addValidator(StringLengthValidator.class, 3, 30).addValidator(
            IdentifierValidator.class).addValidator(MandatoryValidator.class)).addUIFormInput(
         new UIFormStringInput("title", "title", null).addValidator(StringLengthValidator.class, 3, 120))
         .addUIFormInput(new UIFormCheckBoxInput("showMaxWindow", "showMaxWindow", false));
      addUIFormInput(uiSettingSet);
      setSelectedTab(uiSettingSet.getId());

      uiPermissionSetting = createUIComponent(UIFormInputSet.class, "PermissionSetting", null);
      UIListPermissionSelector uiListPermissionSelector = createUIComponent(UIListPermissionSelector.class, null, null);
      uiListPermissionSelector.configure("UIListPermissionSelector", "accessPermissions");
      uiListPermissionSelector.addValidator(EmptyIteratorValidator.class);
      uiPermissionSetting.addChild(uiListPermissionSelector);
      uiPermissionSetting.setSelectedComponent(uiListPermissionSelector.getId());
      UIPermissionSelector uiEditPermission = createUIComponent(UIPermissionSelector.class, null, null);
      uiEditPermission.setRendered(false);
      uiEditPermission.addValidator(org.exoplatform.webui.organization.UIPermissionSelector.MandatoryValidator.class);
      uiEditPermission.setEditable(false);
      uiEditPermission.configure("UIPermissionSelector", "editPermission");
      uiPermissionSetting.addChild(uiEditPermission);

      //TODO: This following line is fixed for bug PORTAL-2127
      uiListPermissionSelector.getChild(UIFormPopupWindow.class).setId("UIPageFormPopupGroupMembershipSelector");

      List<String> groups = configService.getMakableNavigations(pcontext.getRemoteUser(), true);
      if (groups.size() > 0)
      {
         Collections.sort(groups);
         ownerTypes.add(new SelectItemOption<String>(PortalConfig.GROUP_TYPE));
         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);
      }
      setActions(new String[]{"Save", "Close"});
   }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

   static public 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();
         if (PortalConfig.USER_TYPE.equals(ownerType))
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

      UIFormInputSet uiPropertiesSet = new UIFormInputSet("Properties");
      uiSettingSet.addUIFormInput(
         new UIFormStringInput(FIELD_NAME, FIELD_NAME, null).addValidator(MandatoryValidator.class).addValidator(
            StringLengthValidator.class, 3, 30).addValidator(IdentifierValidator.class).setEditable(false))
         .addUIFormInput(
            new UIFormSelectBox(FIELD_LOCALE, FIELD_LOCALE, languages).addValidator(MandatoryValidator.class));

      List<SelectItemOption<String>> listSkin = new ArrayList<SelectItemOption<String>>();
      SkinService skinService = getApplicationComponent(SkinService.class);
      for (String skin : skinService.getAvailableSkinNames())
      {
         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);
      addUIFormInput(uiPropertiesSet);

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

Examples of org.exoplatform.webui.form.UIFormSelectBox

         .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 UIFormCheckBoxInput<String>(RECEIVE_EMAIL, null, "test"));
     
      List<SelectItemOption<String>> comboBoxItemOptions = new ArrayList<SelectItemOption<String>>();
      comboBoxItemOptions.add(new SelectItemOption<String>(("VI")));
      comboBoxItemOptions.add(new SelectItemOption<String>(("UK")));
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.