Examples of UIFormInputSet


Examples of org.exoplatform.webui.form.UIFormInputSet

   public UIPageNodeForm() throws Exception
   {
      super("UIPageNodeForm");

      UIFormInputSet uiSettingSet = new UIFormInputSet("PageNodeSetting");
      UIFormCheckBoxInput<Boolean> uiDateInputCheck =
         new UIFormCheckBoxInput<Boolean>(SHOW_PUBLICATION_DATE, SHOW_PUBLICATION_DATE, false);
      UIFormCheckBoxInput<Boolean> uiVisibleCheck = new UIFormCheckBoxInput<Boolean>(VISIBLE, VISIBLE, true);
     
      uiDateInputCheck.setOnChange("SwitchPublicationDate");
      uiVisibleCheck.setOnChange("SwitchVisible");
      uiSettingSet.addUIFormInput(new UIFormStringInput("uri", "uri", null).setEditable(false))
              .addUIFormInput(new UIFormStringInput("name", "name", null).addValidator(MandatoryValidator.class).addValidator(StringLengthValidator.class, 3, 30).addValidator(IdentifierValidator.class))
              .addUIFormInput(new UIFormStringInput("label", "label", null).addValidator(StringLengthValidator.class, 3, 120))
              .addUIFormInput(uiVisibleCheck.setChecked(true))
              .addUIFormInput(uiDateInputCheck)
              .addUIFormInput(new UIFormDateTimeInput(START_PUBLICATION_DATE, null, null).addValidator(DateTimeValidator.class))
              .addUIFormInput(new UIFormDateTimeInput(END_PUBLICATION_DATE, null, null).addValidator(DateTimeValidator.class));
     
      addUIFormInput(uiSettingSet);
      setSelectedTab(uiSettingSet.getId());

      UIPageSelector2 uiPageSelector = createUIComponent(UIPageSelector2.class, null, null);
      uiPageSelector.configure("UIPageSelector2", "pageReference");
      addUIFormInput(uiPageSelector);
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

         icon = "Default";
      getChild(UIFormInputIconSelector.class).setSelectedIcon(icon);
      getUIStringInput("label").setValue(pageNode_.getLabel());
      if(pageNode.getVisibility() == Visibility.SYSTEM)
      {
         UIFormInputSet uiSettingSet = getChildById("PageNodeSetting");
         uiSettingSet.removeChildById(VISIBLE);
         uiSettingSet.removeChildById(SHOW_PUBLICATION_DATE);
         uiSettingSet.removeChildById(START_PUBLICATION_DATE);
         uiSettingSet.removeChildById(END_PUBLICATION_DATE);
      }
      else
      {
         getUIFormCheckBoxInput(VISIBLE).setChecked(pageNode_.isVisible());
         getUIFormCheckBoxInput(SHOW_PUBLICATION_DATE).setChecked(pageNode.isShowPublicationDate());
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

         UIPageSelector2 pageSelector = uiForm.findFirstComponentOfType(UIPageSelector2.class);

         PortalRequestContext pcontext = Util.getPortalRequestContext();
         UIPortalApplication uiPortalApp = Util.getUIPortalApplication();

         UIFormInputSet uiInputSet = pageSelector.getChild(UIFormInputSet.class);
         List<UIComponent> children = uiInputSet.getChildren();
         /*********************************************************************/
         for (UIComponent uiChild : children)
         {
            if (uiChild instanceof UIFormInputBase)
            {
               UIFormInputBase uiInput = (UIFormInputBase)uiChild;
               if (!uiInput.isValid())
                  continue;
               List<Validator> validators = uiInput.getValidators();
               if (validators == null)
                  continue;
               try
               {
                  for (Validator validator : validators)
                     validator.validate(uiInput);
               }
               catch (MessageException ex)
               {
                  uiPortalApp.addMessage(ex.getDetailMessage());
                  return;
               }
               catch (Exception ex)
               {
                  //TODO:  This is a  critical exception and should be handle  in the UIApplication
                  uiPortalApp.addMessage(new ApplicationMessage(ex.getMessage(), null));
                  return;
               }
            }
         }

         UserACL userACL = uiForm.getApplicationComponent(UserACL.class);

         String ownerId = uiForm.getOwner();
         String[] accessPermission = new String[1];
         accessPermission[0] = "*:" + ownerId;
         String editPermission = userACL.getMakableMT() + ":" + ownerId;
        
         if (PortalConfig.PORTAL_TYPE.equals(uiForm.getOwnerType()))
         {
            UIPortal uiPortal = Util.getUIPortal();
            accessPermission = uiPortal.getAccessPermissions();
            editPermission = uiPortal.getEditPermission();
         }
        
        
         UIFormStringInput uiPageName = uiInputSet.getChildById("pageName");
         UIFormStringInput uiPageTitle = uiInputSet.getChildById("pageTitle");

         Page page = new Page();
         page.setOwnerType(uiForm.getOwnerType());
         page.setOwnerId(ownerId);
         page.setName(uiPageName.getValue());
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

      List<UIFormInputSet> uiInputSetList = new ArrayList<UIFormInputSet>();
      UIFormTableInputSet uiTableInputSet = getChild(UIFormTableInputSet.class);
      int i = 0;
      for (Application app : applications_)
      {
         UIFormInputSet uiInputSet = new UIFormInputSet(app.getId());
         ArrayList<SelectItemOption<String>> options = new ArrayList<SelectItemOption<String>>(5);
         options.add(new SelectItemOption<String>("", String.valueOf(i)));
         UIFormRadioBoxInput uiRadioInput = new UIFormRadioBoxInput(FIELD_APPLICATION, "", options);
         //TODO review
         if (i == 0)
         {
            uiRadioInput.setValue(options.get(0).getValue());
         }
         //----------------------------------------------
         uiInputSet.addChild(uiRadioInput);
         UIFormInputInfo uiInfo = new UIFormInputInfo("label", null, app.getDisplayName());
         uiInputSet.addChild(uiInfo);
         uiInfo = new UIFormInputInfo("description", null, app.getDescription());
         uiInputSet.addChild(uiInfo);
         uiTableInputSet.addChild(uiInputSet);
         uiInputSetList.add(uiInputSet);
         i++;
      }
      UIFormPageIterator uiIterator = uiTableInputSet.getChild(UIFormPageIterator.class);
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

        super("UIPageSelector", null);
        UIFormPopupWindow uiPopup = addChild(UIFormPopupWindow.class, null, "PopupPageSelector2");
        uiPopup.setWindowSize(900, 400);
        uiPopup.setShow(false);

        UIFormInputSet uiInputSet = new UIFormInputSet("PageNodeSetting");

        uiInputSet.addChild(new UIFormStringInput("pageId", "pageId", null));
        uiInputSet.addChild(new UIFormStringInput("pageName", "pageName", null).addValidator(UserConfigurableValidator.class, UserConfigurableValidator.PAGE_NAME)
                .addValidator(MandatoryValidator.class));
        uiInputSet.addChild(new UIFormStringInput("pageTitle", "pageTitle", null).addValidator(StringLengthValidator.class, 3,
                120).addValidator(NotHTMLTagValidator.class));

        addChild(uiInputSet);
    }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

        UIPageBrowser uiPageBrowser = findFirstComponentOfType(UIPageBrowser.class);
        if (uiPageBrowser != null) {
            uiPageBrowser.processDecode(context);
        }

        UIFormInputSet uiInputSet = getChild(UIFormInputSet.class);

        List<UIComponent> children = uiInputSet.getChildren();
        for (UIComponent ele : children) {
            ele.processDecode(context);
        }
        // UIFormStringInput uiPageId = getChildById("pageId");
        // uiPageId.processDecode(context);
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

    public UIUserProfileInputSet(String name) throws Exception {
        super(name);
        setComponentConfig(UIUserProfileInputSet.class, null);

        UIFormInputSet personalInputSet = new UIFormInputSet("Profile");
        addInput(personalInputSet, UserProfile.PERSONAL_INFO_KEYS);
        addUIFormInput(personalInputSet);

        UIFormInputSet homeInputSet = new UIFormInputSet("HomeInfo");
        addInput(homeInputSet, UserProfile.HOME_INFO_KEYS);
        homeInputSet.setRendered(false);
        addUIFormInput(homeInputSet);

        UIFormInputSet businessInputSet = new UIFormInputSet("BusinessInfo");
        addInput(businessInputSet, UserProfile.BUSINESE_INFO_KEYS);
        businessInputSet.setRendered(false);
        addUIFormInput(businessInputSet);

        OAuthProviderTypeRegistry registry = getApplicationComponent(OAuthProviderTypeRegistry.class);
        if (registry.isOAuthEnabled()) {
            UIFormInputSet socialInputSet = new UIFormInputSet("SocialNetworksInfo");
            addInput(socialInputSet, getSocialInfoKeys());
            socialInputSet.setRendered(false);
            addUIFormInput(socialInputSet);
        }
    }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

        }

        if (userProfile.getUserInfoMap() == null)
            return;
        for (UIComponent set : getChildren()) {
            UIFormInputSet inputSet = (UIFormInputSet) set;
            for (UIComponent uiComp : inputSet.getChildren()) {
                UIFormStringInput uiInput = (UIFormStringInput) uiComp;
                uiInput.setValue(userProfile.getAttribute(uiInput.getName()));
            }
        }
    }
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormInputSet

            userProfile = hanlder.createUserProfileInstance();
            userProfile.setUserName(user_);
        }

        for (UIComponent set : getChildren()) {
            UIFormInputSet inputSet = (UIFormInputSet) set;
            for (UIComponent uiComp : inputSet.getChildren()) {
                UIFormStringInput uiInput = (UIFormStringInput) uiComp;
                // if(uiInput.getValue() == null || uiInput.getValue().length() < 1)
                // continue;
                userProfile.getUserInfoMap().put(uiInput.getName(), uiInput.getValue());
            }
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.