Examples of FormException


Examples of com.dooapp.fxform.model.FormException

            if (name.equals(field.getName())) {
                remaining.remove(field);
                return field;
            }
        }
        throw new FormException(name + "not found in field list");
    }
View Full Code Here

Examples of com.dooapp.fxform.model.FormException

        }
        for (FieldFilter filter : filters) {
            try {
                elements = filter.filter(elements);
            } catch (FilterException e) {
                throw new FormException("Something went wrong happened while applying " + filter + ":\n" + e.getMessage(), e);
            }
        }
        for (Element element : elements) {
            ElementController controller = null;
            if (PropertyFieldElement.class.isAssignableFrom(element.getClass())) {
View Full Code Here

Examples of com.dooapp.fxform.model.FormException

    private List<InvalidationListener> invalidationListeners = new LinkedList<InvalidationListener>();

    public ReadOnlyPropertyFieldElement(Field field) throws FormException {
        this.field = field;
        if (!ObservableValue.class.isAssignableFrom(field.getType())) {
            throw new FormException("Trying to create an observable field element with a non-observable field " + field.getType());
        }
        valueProperty().addListener(new ChangeListener<ObservableValue<WrappedType>>() {
            public void changed(ObservableValue<? extends ObservableValue<WrappedType>> observableValue, ObservableValue<WrappedType> wrappedTypeObservableValue, ObservableValue<WrappedType> wrappedTypeObservableValue1) {
                for (InvalidationListener invalidationListener : invalidationListeners) {
                    wrappedTypeObservableValue.removeListener(invalidationListener);
View Full Code Here

Examples of com.dooapp.fxform.model.FormException

public class PropertyFieldElement<SourceType, WrappedType> extends ReadOnlyPropertyFieldElement<SourceType, WrappedType> implements PropertyElement<WrappedType> {

    public PropertyFieldElement(Field field) throws FormException {
        super(field);
        if (!WritableValue.class.isAssignableFrom(field.getType())) {
            throw new FormException("Trying to create a writable field element with a non-writable field: " + field.getType());
        }
    }
View Full Code Here

Examples of com.dooapp.fxform.model.FormException

            if (name.equals(field.getName())) {
                remaining.remove(field);
                return field;
            }
        }
        throw new FormException(name + "not found in field list");
    }
View Full Code Here

Examples of de.mhus.lib.form.FormException

      } catch (ValidateException e) {
        setError(true);
        setCurrentError(e.findMessage());
      } catch (Throwable e) {
        setError(true);
        throw new FormException(getTarget(), this, "set"
            + getNameAsMethodSuffix(),e);
      }
    }

    try {
      getTarget().getClass().getMethod("set" + getNameAsMethodSuffix(),
          new Class[] { getFormValueClass() }).invoke(getTarget(),
          new Object[] { getFormValue() });
      setChanged(false);
      setError(false);
    } catch (InvocationTargetException e) {
      Throwable f = e.getCause();
      if (f != null && (f instanceof ValidateException)) {
        setError(true);
        setCurrentError(((ValidateException)f).findMessage());
      } else {
        setError(true);
        throw new FormException(getTarget(), this, "set"
            + getNameAsMethodSuffix(),e);
      }
    } catch (Throwable e) {
      setError(true);
      throw new FormException(getTarget(), this, "set"
          + getNameAsMethodSuffix(),e);
    }
  }
View Full Code Here

Examples of de.mhus.lib.form.FormException

      ((FNumber)target).setValue(0);
    else
      try {
        ((FNumber)target).setValue(MCast.todouble(val.toString()));
      } catch (NumberFormatException nfe) {
        throw new FormException(this, target );
      }
  }
View Full Code Here

Examples of hudson.model.Descriptor.FormException

    private void checkAxisNames(Iterable<Axis> newAxes) throws FormException {
        HashSet<String> axisNames = new HashSet<String>();
        for (Axis a : newAxes) {
            FormValidation fv = a.getDescriptor().doCheckName(a.getName());
            if (fv.kind!=Kind.OK)
                throw new FormException(Messages.MatrixProject_DuplicateAxisName(),fv,"axis.name");

            if (axisNames.contains(a.getName()))
                throw new FormException(Messages.MatrixProject_DuplicateAxisName(),"axis.name");
            axisNames.add(a.getName());
        }
    }
View Full Code Here

Examples of hudson.model.Descriptor.FormException

        getAssignedLabels();    // compute labels now
       
        this.nodeProperties.replaceBy(nodeProperties);

        if (name.equals(""))
            throw new FormException(Messages.Slave_InvalidConfig_NoName(), null);

//        if (remoteFS.equals(""))
//            throw new FormException(Messages.Slave_InvalidConfig_NoRemoteDir(name), null);

        if (this.numExecutors<=0)
            throw new FormException(Messages.Slave_InvalidConfig_Executors(name), null);
    }
View Full Code Here

Examples of hudson.model.Descriptor.FormException

     */
    public void rename(String newName) throws Failure, FormException {
        if(name.equals(newName))    return; // noop
        checkGoodName(newName);
        if(owner.getView(newName)!=null)
            throw new FormException(Messages.Hudson_ViewAlreadyExists(newName),"name");
        String oldName = name;
        name = newName;
        owner.onViewRenamed(this,oldName,newName);
    }
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.