Package org.apache.tapestry5

Examples of org.apache.tapestry5.ValidationTracker


            markupWriter.end(); // span
        }
    }

    private boolean inError(Field field) {
        ValidationTracker tracker = environment.peekRequired(ValidationTracker.class);
        return tracker.inError(field);
    }
View Full Code Here


        ValidationTracker tracker = environment.peekRequired(ValidationTracker.class);
        return tracker.inError(field);
    }

    private String getError(Field field) {
        ValidationTracker tracker = environment.peekRequired(ValidationTracker.class);
        return tracker.getError(field);
    }
View Full Code Here

    public void afterField(Field field) {
    }

    private boolean inError(Field field) {
        ValidationTracker tracker = environment
                .peekRequired(ValidationTracker.class);

        return tracker.inError(field);
    }
View Full Code Here

        return tracker.inError(field);
    }

    private String getError(Field field) {
        ValidationTracker tracker = environment
                .peekRequired(ValidationTracker.class);
        return tracker.getError(field);
    }
View Full Code Here

   @Override
     public void beforeLabel(Field field) {
         if (inError(field)) {
             markupWriter.element("div",
                     "class", "single-error-message");
             ValidationTracker tracker =
               environment.peekRequired(ValidationTracker.class);
             markupWriter.write(tracker.getError(field));
             markupWriter.end();

         }
     }
View Full Code Here

  public void afterField(Field field) {

    System.out.println(field.getControlName());
    if (inError(field)) {

      ValidationTracker tracker = getTracker();
      markupWriter.element("span", "class", "error-description");
      markupWriter.write(tracker.getError(field));
      markupWriter.end();

    }

  }
View Full Code Here

  public void afterLabel(Field field) {
   
    if (inError(field)) {
             markupWriter.element("span",
                     "class", "single-error-message");
             ValidationTracker tracker =
               environment.peekRequired(ValidationTracker.class);
             markupWriter.write("texto");
             markupWriter.write(tracker.getError(field));
             markupWriter.end();

         }

  }
View Full Code Here

         }

  }

  private boolean inError(Field field) {
    ValidationTracker tracker = getTracker();
    return tracker.inError(field);
  }
View Full Code Here

     * @return a tracker ready to receive data (possibly a previously stored tracker with field
     *         input and errors)
     */
    private ValidationTracker getWrappedTracker()
    {
        ValidationTracker innerTracker = tracker == null ? new ValidationTrackerImpl() : tracker;

        ValidationTracker wrapper = new ValidationTrackerWrapper(innerTracker)
        {
            private boolean saved = false;

            private void save()
            {
View Full Code Here

        {
            ValidationException ve = ExceptionUtils.findCause(ex, ValidationException.class);

            if (ve != null)
            {
                ValidationTracker tracker = environment.peek(ValidationTracker.class);

                tracker.recordError(ve.getMessage());

                return;
            }

            throw ex;
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ValidationTracker

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.