Examples of UIFormSelectBox


Examples of org.exoplatform.webui.form.UIFormSelectBox

   public UIGroupMembershipForm() throws Exception
   {
      addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME, null).addValidator(MandatoryValidator.class)
         .addValidator(ExpressionValidator.class, "^\\p{L}[\\p{L}\\d._\\-\\s*,\\s*]+$",
            "UIGroupMembershipForm.msg.Invalid-char"));
      addUIFormInput(new UIFormSelectBox("membership", "membership", listOption).setSize(1));
      UIPopupWindow searchUserPopup = addChild(UIPopupWindow.class, "SearchUser", "SearchUser");
      searchUserPopup.setWindowSize(640, 0);
      //    UIListUsers listUsers = createUIComponent(UIListUsers.class, null, "ListUserForSearch");
      //    searchUserPopup.setUIComponent(listUsers);
      //    UIGrid grid = listUsers.findFirstComponentOfType(UIGrid.class);
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

                .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);
        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);

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

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

                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

Examples of org.exoplatform.webui.form.UIFormSelectBox

        if (groups.size() > 0) {
            ownerTypes.add(new SelectItemOption<String>(SiteType.GROUP.getName()));
        }

        ownerTypes.add(new SelectItemOption<String>(SiteType.USER.getName()));
        UIFormSelectBox uiSelectBoxOwnerType = new UIFormSelectBox(OWNER_TYPE, OWNER_TYPE, ownerTypes);
        uiSelectBoxOwnerType.setOnChange("ChangeOwnerType");
        uiSettingSet.addUIFormInput(uiSelectBoxOwnerType);

        ownerIdInput = new UIFormStringInput(OWNER_ID, OWNER_ID, null);
        ownerIdInput.setReadOnly(true).setValue(pcontext.getRemoteUser());
        uiSettingSet.addUIFormInput(ownerIdInput);
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

            priorties.add(new SelectItemOption<String>(getPriority(), getPriority()));
        }

        addUIFormInput(new UIFormStringInput("ownerType", "ownerType", getOwnerType()).setReadOnly(true)).addUIFormInput(
                new UIFormStringInput("ownerId", "ownerId", ownerId).setReadOnly(true)).addUIFormInput(
                new UIFormSelectBox("priority", null, priorties).setValue(getPriority()));
    }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

        removeChildById("ownerId");
        UIFormStringInput ownerId = new UIFormStringInput("ownerId", "ownerId", userNavigation.getKey().getName());
        ownerId.setReadOnly(true);
        ownerId.setParent(this);
        getChildren().add(1, ownerId);
        UIFormSelectBox uiSelectBox = findComponentById("priority");
        uiSelectBox.setValue(String.valueOf(userNavigation.getPriority()));
    }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

        UICheckBoxInput uiRestrictOutsidePublicationWindow = new UICheckBoxInput(RESTRICT_OUTSIDE_PUBLICATION_WINDOW, null, false);
        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(UserConfigurableValidator.class, UserConfigurableValidator.PAGE_NAME));
        addUIFormInput(uiSwitchLabelMode);
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormSelectBox

                UIPopupWindow uiPopup = uiForm.getParent();
                uiPopup.setShow(false);
                return;
            }

            UIFormSelectBox uiSelectBox = uiForm.findComponentById("priority");
            int priority = Integer.parseInt(uiSelectBox.getValue());

            // update navigation
            NavigationService service = uiForm.getApplicationComponent(NavigationService.class);
            NavigationContext ctx = service.loadNavigation(userNav.getKey());
            ctx.setState(new NavigationState(priority));
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.