Package org.olat.core.gui.components.form.flexible.impl.elements

Examples of org.olat.core.gui.components.form.flexible.impl.elements.ItemValidatorProvider


    TextElement lTarget = uifactory.addTextElement("target" + counter, null, -1, link.getTarget(), titleContainer);
    lTarget.clearError();
    lTarget.setDisplaySize(40);
    lTarget.setMandatory(true);
    lTarget.setNotEmptyCheck("ll.table.target.error");
    lTarget.setItemValidatorProvider(new ItemValidatorProvider() {
      public boolean isValidValue(String value, ValidationError validationError, @SuppressWarnings("unused") Locale locale) {
        try {
          if (!value.contains("://")) {
            value = "http://".concat(value);
          }
View Full Code Here


    org.olat.core.gui.components.form.flexible.elements.TextElement tElem = null;
    tElem = (org.olat.core.gui.components.form.flexible.elements.TextElement) super.addFormItem(locale, user, usageIdentifyer, isAdministrativeUser, formItemContainer);
    //special validator in case of bulkChange, wizard in first step allows entry of ${userProperty} (velocity-style)
    //to validate the input a special isValidValue is used.
    if (usageIdentifyer.equals(UserBulkChangeStep00.class.getCanonicalName())){
      tElem.setItemValidatorProvider(new ItemValidatorProvider(){
        public boolean isValidValue(String value, ValidationError validationError, Locale locale2) {
          UserBulkChangeManager ubcMan = UserBulkChangeManager.getInstance();
          Context vcContext = new VelocityContext();
          if (user==null){
            vcContext = ubcMan.getDemoContext(locale2, isAdministrativeUser);
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.form.flexible.impl.elements.ItemValidatorProvider

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.