Examples of UIFormInputSet


Examples of org.exoplatform.webui.form.UIFormInputSet

        addCategory.setCssIconClass("SearchIcon");
        actions.add(addCategory);
        accountInputSet.setActionField("username", actions);
        setSelectedTab(accountInputSet.getId());
        addChild(accountInputSet);
        UIFormInputSet userProfileSet = new UIUserProfileInputSet("UIUserProfileInputSet");
        addUIFormInput(userProfileSet);
        if (initParams == null)
            return;

        setActions(new String[] { "Save", "Reset" });
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

    private static final String FIELD_PORTLET_PREF = "PortletPref";

    @SuppressWarnings("unchecked")
    public UIPortletForm() throws Exception {
        super("UIPortletForm");
        UIFormInputSet uiPortletPrefSet = new UIFormInputSet(FIELD_PORTLET_PREF).setRendered(false);
        addUIFormInput(uiPortletPrefSet);
        UIFormInputSet uiSettingSet = new UIFormInputSet("PortletSetting");
        uiSettingSet
                .addUIFormInput(new UIFormInputInfo("displayName", "displayName", null))
                .addUIFormInput(
                        new UIFormStringInput("title", "title", null).addValidator(StringLengthValidator.class, 3, 60)
                                .addValidator(NotHTMLTagValidator.class, "UIPortletForm.msg.InvalidPortletTitle"))
                .addUIFormInput(
                        new UIFormStringInput("width", "width", null).addValidator(ExpressionValidator.class,
                                "(^([1-9]\\d*)(?:px)?$)?", "UIPortletForm.msg.InvalidWidthHeight"))
                .addUIFormInput(
                        new UIFormStringInput("height", "height", null).addValidator(ExpressionValidator.class,
                                "(^([1-9]\\d*)(?:px)?$)?", "UIPortletForm.msg.InvalidWidthHeight"))
                .addUIFormInput(new UICheckBoxInput("showInfoBar", "showInfoBar", false))
                .addUIFormInput(new UICheckBoxInput("showPortletMode", "showPortletMode", false))
                .addUIFormInput(new UICheckBoxInput("showWindowState", "showWindowState", false))
                .addUIFormInput(
                        new UIFormTextAreaInput("description", "description", null).addValidator(NotHTMLTagValidator.class,
                                "UIPortletForm.msg.InvalidPortletDescription"));
        addUIFormInput(uiSettingSet);
        UIFormInputIconSelector uiIconSelector = new UIFormInputIconSelector("Icon", "icon");
        addUIFormInput(uiIconSelector);

        UIFormInputThemeSelector uiThemeSelector = new UIFormInputThemeSelector(FIELD_THEME, null);
        SkinService skinService = getApplicationComponent(SkinService.class);
        uiThemeSelector.getChild(UIItemThemeSelector.class).setValues(skinService.getPortletThemes());
        addUIFormInput(uiThemeSelector);

        PortalRequestContext prc = Util.getPortalRequestContext();
        if (prc.getSiteType() != SiteType.USER) {
            UIListPermissionSelector uiListPermissionSelector = createUIComponent(UIListPermissionSelector.class, null, null);
            uiListPermissionSelector.configure(WebuiRequestContext.generateUUID("UIListPermissionSelector"), "accessPermissions");
            uiListPermissionSelector.addValidator(EmptyIteratorValidator.class);
            UIFormInputSet uiPermissionSet = createUIComponent(UIFormInputSet.class, "PortletPermission", null);
            uiPermissionSet.addChild(uiListPermissionSelector);
            addUIFormInput(uiPermissionSet);
        }
    }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

                }
            }

            if (portletPreferenceMaps.size() > 0) {
                Set<String> ppKeySet = portletPreferenceMaps.keySet();
                UIFormInputSet uiPortletPrefSet = getChildById(FIELD_PORTLET_PREF);
                uiPortletPrefSet.getChildren().clear();
                for (String ppKey : ppKeySet) {
                    String ppValue = portletPreferenceMaps.get(ppKey);
                    UIFormStringInput preferenceStringInput = new UIFormStringInput(ppKey, null, ppValue);
                    preferenceStringInput.setLabel(ppKey);
                    preferenceStringInput.addValidator(MandatoryValidator.class);
                    uiPortletPrefSet.addUIFormInput(preferenceStringInput);
                }

                uiPortletPrefSet.setRendered(true);
                setSelectedTab(FIELD_PORTLET_PREF);
            } else {
                setSelectedTab("PortletSetting");
            }
        }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

        }
        return true;
    }

    private void savePreferences() throws Exception {
        UIFormInputSet uiPortletPrefSet = getChildById(FIELD_PORTLET_PREF);
        List<UIFormStringInput> uiFormInputs = new ArrayList<UIFormStringInput>(3);
        uiPortletPrefSet.findComponentOfType(uiFormInputs, UIFormStringInput.class);
        if (uiFormInputs.size() < 1) {
            return;
        }

        PropertyChange[] propertyChanges = new PropertyChange[uiFormInputs.size()];
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

    private UIComponent backComponent_;

    public UIContainerForm() throws Exception { // InitParams initParams
        super("UIContainerForm");
        UIFormInputSet infoInputSet = new UIFormInputSet("ContainerSetting");
        infoInputSet
                .addUIFormInput(
                        new UIFormStringInput("id", "id", null).addValidator(MandatoryValidator.class)
                                .addValidator(StringLengthValidator.class, 3, 30).addValidator(NameValidator.class))
                .addUIFormInput(
                        new UIFormStringInput("title", "title", null).addValidator(StringLengthValidator.class, 50)
                                .addValidator(NotHTMLTagValidator.class, "UIContainerForm.msg.InvalidContainerTitle"))
                .addUIFormInput(
                        new UIFormStringInput("width", "width", null).addValidator(ExpressionValidator.class,
                                "(^([1-9]\\d*)(px|%)$)?", "UIContainerForm.msg.InvalidWidthHeight"))
                .addUIFormInput(
                        new UIFormStringInput("height", "height", null).addValidator(ExpressionValidator.class,
                                "(^([1-9]\\d*)(px|%)$)?", "UIContainerForm.msg.InvalidWidthHeight"));
        addChild(infoInputSet);
        setSelectedTab(infoInputSet.getId());

        PortalRequestContext prc = Util.getPortalRequestContext();
        if (prc.getSiteType() != SiteType.USER) {
            UIListPermissionSelector uiListPermissionSelector = createUIComponent(UIListPermissionSelector.class, null, null);
            uiListPermissionSelector.configure(WebuiRequestContext.generateUUID("UIListPermissionSelector"), "accessPermissions");
            uiListPermissionSelector.addValidator(EmptyIteratorValidator.class);
            UIFormInputSet uiPermissionSet = createUIComponent(UIFormInputSet.class, "UIContainerPermission", null);
            uiPermissionSet.addChild(uiListPermissionSelector);
            addUIFormInput(uiPermissionSet);
        }
    }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

        page.setFactoryId(selectedPage.getFactoryId());
    }

    private void loadMakableGroupNavigations() throws Exception {
        if (groupIdSelectBox == null) {
            UIFormInputSet uiSettingSet = getChildById("PageSetting");
            PortalRequestContext pcontext = Util.getPortalRequestContext();
            UserPortalConfigService userPortalConfigService = getApplicationComponent(UserPortalConfigService.class);
            List<String> groups = userPortalConfigService.getMakableNavigations(pcontext.getRemoteUser(), true);
            if (groups.size() > 0) {
                Collections.sort(groups);
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

        PortalConfig pConfig = dataStorage.getPortalConfig(pcontext.getPortalOwner());
        ExoContainer container = ExoContainerContext.getCurrentContainer();
        UserACL acl = (UserACL) container.getComponentInstanceOfType(UserACL.class);

        UIFormInputSet uiSettingSet = new UIFormInputSet("PageSetting");
        uiSettingSet.addUIFormInput(new UIFormStringInput("pageId", "pageId", null).setReadOnly(true));

        List<SelectItemOption<String>> ownerTypes = new ArrayList<SelectItemOption<String>>();
        if (pConfig != null && acl.hasEditPermission(pConfig)) {
            ownerTypes.add(new SelectItemOption<String>(SiteType.PORTAL.getName()));
        }

        UserPortalConfigService userPortalConfigService = getApplicationComponent(UserPortalConfigService.class);
        List<String> groups = userPortalConfigService.getMakableNavigations(pcontext.getRemoteUser(), true);
        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);

        uiSettingSet
                .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)
                                .addValidator(NotHTMLTagValidator.class))
                .addUIFormInput(new UICheckBoxInput("showMaxWindow", "showMaxWindow", false));

        addUIFormInput(uiSettingSet);
        setSelectedTab(uiSettingSet.getId());

        if (uiPage == null) {
            UIPageTemplateOptions uiTemplateConfig = createUIComponent(UIPageTemplateOptions.class, null, null);
            addUIFormInput(uiTemplateConfig);
        }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

    }

    public static class CheckShowActionListener extends EventListener<UIPortalForm> {
        public void execute(Event<UIPortalForm> event) throws Exception {
            UIPortalForm uiForm = event.getSource();
            UIFormInputSet InfoForm = uiForm.getChildById("Properties");
            UIFormCheckBoxInput<Boolean> showInfobarForm = InfoForm.getUIFormCheckBoxInput(UIPortalForm.FIELD_SHOW_INFOBAR);

            // TODO: When we need to implement for showPortletMode or showWindowState
            // we can change how to get/set value for showInfobarForm (as well as of PortalConfig)
            showInfobarForm.setValue(showInfobarForm.isChecked());
            event.getRequestContext().addUIComponentToUpdateByAjax(uiForm);
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

        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 (SiteType.PORTAL.getName().equals(ownerType)) {
                list.remove(2);
                list.add(2, uiForm.ownerIdInput);
                uiForm.ownerIdInput.setValue(prContext.getPortalOwner());
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

     * The name of the quick search set
     */
    public static final String QUICK_SEARCH_SET = "QuickSearchSet";

    public UIPageSearchForm() throws Exception {
        UIFormInputSet uiQuickSearchSet = new UIFormInputSet(QUICK_SEARCH_SET);
        uiQuickSearchSet.addUIFormInput(new UIFormStringInput("pageTitle", "pageTitle", null));
        uiQuickSearchSet.addUIFormInput(new UIFormStringInput("siteName", "siteName", null).addValidator(
                ExpressionValidator.class, "[^\\'\"]*", "UISearchForm.msg.empty"));
        uiQuickSearchSet.addUIFormInput(new UIFormSelectBox("searchOption", null, null));
        addChild(uiQuickSearchSet);
    }
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.