Examples of FormItem


Examples of org.olat.core.gui.components.form.flexible.FormItem

      for (Iterator<MultipleSelectionElement> iterator = checkBoxes.iterator(); iterator.hasNext();) {
        MultipleSelectionElement checkbox = iterator.next();
        if (checkbox.isSelected(0)) {
          Context vcContext = ubcMan.getDemoContext(getTranslator(), isAdministrativeUser);
          validChange = true;
          FormItem formItem = formItems.get(i);
          if (formItem instanceof TextElement) {
            TextElement propertyField = (TextElement) formItem;
            String inputFieldValue = propertyField.getValue();


            // check validity of velocity-variables by using default values from
            // userproperties
            inputFieldValue = inputFieldValue.replace("$", "$!");
            String evaluatedInputFieldValue = ubcMan.evaluateValueWithUserContext(inputFieldValue, vcContext);

            // check user property configuration
            for (UserPropertyHandler handler : userPropertyHandlers) {
              if (handler.getName().equals(formItem.getName())) {
                // first check on mandatoryness
                if (um.isMandatoryUserProperty(usageIdentifyer, handler) && ! StringHelper.containsNonWhitespace(evaluatedInputFieldValue)) {
                  formItem.setErrorKey("form.name." + handler.getName() + ".error.empty", null);       
                  return false;                 
                }
                // second check on property content
                ValidationError valicationError = new ValidationError();
                if (! handler.isValidValue(evaluatedInputFieldValue, valicationError, ureq.getLocale())) {
                  formItem.setErrorKey(valicationError.getErrorKey(), null);
                  return false;
                }
                // else validation was ok, reset previous errors
                formItem.clearError();
              }
            }

            // special case: check password-syntax:
            if (propertyField.getName().equals("password")) {
View Full Code Here

Examples of org.olat.core.gui.components.form.flexible.FormItem

  }

  protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (event instanceof FormEvent) {
      FormEvent fe = (FormEvent) event;
      FormItem sourceItem = fe.getFormItemSource();
      if (source instanceof FormLink) {
        FormLink link = (FormLink)source;
        if (link.getName().equals(ADD_FIELD_LINK)) {
          if (customFields.size() < MAX_NBR_CUSTOM_FIELDS) {
            // Add new custom-field
View Full Code Here

Examples of railo.runtime.type.scope.FormItem

   * read source file
   * @throws PageException
   */

  public void actionUpload() throws PageException {
    FormItem item=getFormItem(pageContext,filefield);
    Struct cffile = _actionUpload(pageContext,securityManager,item,strDestination,nameconflict,accept,strict,mode,attributes,acl,serverPassword);
    if(StringUtil.isEmpty(result)) {
            pageContext.undefinedScope().set(KeyConstants._file,cffile);
        pageContext.undefinedScope().set("cffile",cffile);
        }
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.