Package org.exoplatform.webui.form

Examples of org.exoplatform.webui.form.UIFormInputSet


         //
         Portlet pp = uiPortlet.getPreferences();
         if (pp != null)
         {
            UIFormInputSet uiPortletPrefSet = getChildById(FIELD_PORTLET_PREF);
            uiPortletPrefSet.getChildren().clear();
            for (Preference pref : pp)
            {
               if (!pref.isReadOnly())
               {
                  UIFormStringInput templateStringInput =
                     new UIFormStringInput(pref.getName(), null, pref.getValues().get(0));
                  templateStringInput.setLabel(res.getString("UIPortletForm.tab.label.Template"));
                  templateStringInput.addValidator(MandatoryValidator.class);
                  uiPortletPrefSet.addUIFormInput(templateStringInput);
               }

            }
            if (uiPortletPrefSet.getChildren().size() > 0)
            {
               uiPortletPrefSet.setRendered(true);
               setSelectedTab(FIELD_PORTLET_PREF);
               return;
            }
         }
         setSelectedTab("PortletSetting");
View Full Code Here


      }
   }

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

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

        }

        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

            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

    public static class ResetActionListener extends EventListener<UISampleUIForm> {

        @SuppressWarnings("unchecked")
        @Override
        public void execute(Event<UISampleUIForm> event) throws Exception {
            UIFormInputSet inputSet = event.getSource().getChild(UIFormInputSet.class);
            for (UIComponent child : inputSet.getChildren()) {
                if (child instanceof UIFormColorPicker) {
                    continue;
                }
                ((UIFormInput) child).reset();
            }
View Full Code Here

                    // TODO: This is a critical exception and should be handle in the UIApplication
                    uiApp.addMessage(new ApplicationMessage(ex.getMessage(), null));
                    context.setProcessRender(true);
                }
            } else if (uiChild instanceof UIFormInputSet) {
                UIFormInputSet uiInputSet = (UIFormInputSet) uiChild;
                validateChildren(uiInputSet.getChildren(), uiApp, context);
            } else if (uiChild instanceof UIFormMultiValueInputSet) {
                UIFormMultiValueInputSet uiInput = (UIFormMultiValueInputSet) uiChild;
                List<Validator> validators = uiInput.getValidators();
                if (validators == null) {
                    continue;
View Full Code Here

               context.setProcessRender(true);
            }
         }
         else if (uiChild instanceof UIFormInputSet)
         {
            UIFormInputSet uiInputSet = (UIFormInputSet)uiChild;
            validateChildren(uiInputSet.getChildren(), uiApp, context);
         }
         else if (uiChild instanceof UIFormMultiValueInputSet)
         {
            UIFormMultiValueInputSet uiInput = (UIFormMultiValueInputSet)uiChild;
            List<Validator> validators = uiInput.getValidators();
View Full Code Here

               context.setProcessRender(true);
            }
         }
         else if (uiChild instanceof UIFormInputSet)
         {
            UIFormInputSet uiInputSet = (UIFormInputSet)uiChild;
            validateChildren(uiInputSet.getChildren(), uiApp, context);
         }
         else if (uiChild instanceof UIFormMultiValueInputSet)
         {
            UIFormMultiValueInputSet uiInput = (UIFormMultiValueInputSet)uiChild;
            List<Validator> validators = uiInput.getValidators();
View Full Code Here

      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

TOP

Related Classes of org.exoplatform.webui.form.UIFormInputSet

Copyright © 2018 www.massapicom. 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.