Examples of UIFormStringInput


Examples of org.exoplatform.webui.form.UIFormStringInput

            UILogin uilogin = event.getSource().getParent();
            uilogin.getChild(UILoginForm.class).setRendered(false);
            uilogin.getChild(UIForgetPasswordWizard.class).setRendered(false);
            UIForgetPassword uiForgetpassword = (UIForgetPassword) uilogin.getChild(UIForgetPassword.class).setRendered(true);
            String value = event.getSource().getChild(UIFormRadioBoxInput.class).getValue();
            UIFormStringInput uiEmail = uiForgetpassword.getUIStringInput(UIForgetPassword.Email);
            UIFormStringInput uiUser = uiForgetpassword.getUIStringInput(UIForgetPassword.Username);
            if (value.equals("password")) {
                uiEmail.setRendered(false);
                uiUser.setRendered(true);
            } else {
                uiEmail.setRendered(true);
                uiUser.setRendered(false);
            }
            event.getRequestContext().addUIComponentToUpdateByAjax(uilogin);
        }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormStringInput

    static final String Username = "username";

    static final String Email = "email";

    public UIForgetPassword() throws Exception {
        addUIFormInput(new UIFormStringInput(Username, null).addValidator(MandatoryValidator.class)).addUIFormInput(
                new UIFormStringInput(Email, null).addValidator(MandatoryValidator.class).addValidator(
                        UserConfigurableValidator.class, UserConfigurableValidator.EMAIL));
    }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormStringInput

            UIPageNodeSelector uiNodeSelector = uiPageInfo.getChild(UIPageNodeSelector.class);
            UserNavigation pageNavi = uiNodeSelector.getNavigation();
            String ownerType = pageNavi.getKey().getTypeName();
            String ownerId = pageNavi.getKey().getName();

            UIFormStringInput pageName = uiPageInfo.getUIStringInput(UIWizardPageSetInfo.PAGE_NAME);
            Page page = uiPageTemplateOptions.createPageFromSelectedOption(ownerType, ownerId);
            page.setName("page" + page.hashCode());
            String pageId = ownerType + "::" + ownerId + "::" + page.getName();

            // check page is exist
            PageService pageService = uiWizard.getApplicationComponent(PageService.class);
            if (pageService.loadPage(PageKey.parse(pageId)) != null) {
                uiPortalApp.addMessage(new ApplicationMessage("UIPageCreationWizard.msg.NameNotSame", null));
                uiWizard.viewStep(FIRST_STEP);
                uiWizard.updateWizardComponent();
            }
            page.setModifiable(true);

            // Set default permissions on the page
            setDefaultPermission(page, pageNavi.getKey());

            if (page.getTitle() == null || page.getTitle().trim().length() == 0) {
                page.setTitle(pageName.getValue());
            }

            UIPagePreview uiPagePreview = uiWizard.getChild(UIPagePreview.class);

            UIPageFactory clazz = UIPageFactory.getInstance(page.getFactoryId());
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormStringInput

        /*
         * addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME, null).addValidator(MandatoryValidator.class)
         * .addValidator(UsernameValidator.class, 3, 30));
         */
        addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME, null).addValidator(MandatoryValidator.class).addValidator(
                UserConfigurableValidator.class, UserConfigurableValidator.USERNAME));

        addUIFormInput(new UIFormStringInput(PASSWORD, PASSWORD, null).setType(UIFormStringInput.PASSWORD_TYPE)
                .addValidator(MandatoryValidator.class).addValidator(PasswordStringLengthValidator.class, 6, 30));

        addUIFormInput(new UIFormStringInput(CONFIRM_PASSWORD, CONFIRM_PASSWORD, null).setType(UIFormStringInput.PASSWORD_TYPE)
                .addValidator(MandatoryValidator.class).addValidator(PasswordStringLengthValidator.class, 6, 30));

        addUIFormInput(new UIFormStringInput(FIRST_NAME, FIRST_NAME, null).addValidator(StringLengthValidator.class, 1, 45)
                .addValidator(MandatoryValidator.class).addValidator(PersonalNameValidator.class));

        addUIFormInput(new UIFormStringInput(LAST_NAME, LAST_NAME, null).addValidator(StringLengthValidator.class, 1, 45)
                .addValidator(MandatoryValidator.class).addValidator(PersonalNameValidator.class));

        addUIFormInput(new UIFormStringInput(DISPLAY_NAME, DISPLAY_NAME, null).addValidator(StringLengthValidator.class, 0, 90)
                .addValidator(UserConfigurableValidator.class, "displayname",
                        UserConfigurableValidator.KEY_PREFIX + "displayname", false));

        addUIFormInput(new UIFormStringInput(EMAIL_ADDRESS, EMAIL_ADDRESS, null).addValidator(MandatoryValidator.class)
                .addValidator(UserConfigurableValidator.class, UserConfigurableValidator.EMAIL));

        // Never use captcha if skipCaptcha is true. Otherwise read value from portlet property
        boolean useCaptcha;
        if (skipCaptcha) {
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormStringInput

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

Examples of org.exoplatform.webui.form.UIFormStringInput

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

            uiForm.selectedLocale = languageSelection.getValue();
            label.setValue(uiForm.getLabelOnLocale(uiForm.selectedLocale));
            event.getRequestContext().addUIComponentToUpdateByAjax(uiForm);
        }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormStringInput

                    return;
                }
            }

            // Update the last value of selected locale to cached labels
            UIFormStringInput label = uiPageSetInfo.getUIStringInput(UIWizardPageSetInfo.I18N_LABEL);
            uiPageSetInfo.updateCachedLabels(uiPageSetInfo.getSelectedLocale(), label.getValue());
        }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormStringInput

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

Examples of org.exoplatform.webui.form.UIFormStringInput

    public void addFormInput() {
        List<SelectItemOption<String>> priorties = new ArrayList<SelectItemOption<String>>();
        for (int i = 1; i < 11; i++) {
            priorties.add(new SelectItemOption<String>(String.valueOf(i), String.valueOf(i)));
        }
        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.UIFormStringInput

    public void setValues(UserNavigation userNavigation) throws Exception {
        setUserNav(userNavigation);
        invokeGetBindingBean(userNavigation);
        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
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.