Examples of ValidationEvent


Examples of javax.xml.bind.ValidationEvent

        String message = e.getMessage();
        if(message==null) {
            message = e.toString();
        }
       
        ValidationEvent ve = new PrintConversionEventImpl(
            ValidationEvent.ERROR, message,
            new ValidationEventLocatorImpl(caller), e );
        serializer.reportError(ve);
    }
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

     * Reports that the type of an object in a property is unexpected. 
     */
    public static void handleTypeMismatchError( XMLSerializer serializer,
            Object parentObject, String fieldName, Object childObject ) throws AbortSerializationException {
       
         ValidationEvent ve = new ValidationEventImpl(
            ValidationEvent.ERROR, // maybe it should be a fatal error.
            Messages.format(Messages.ERR_TYPE_MISMATCH,
                getUserFriendlyTypeName(parentObject),
                fieldName,
                getUserFriendlyTypeName(childObject) ),
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

/*      */   }
/*      */
/*      */   public final void reportError(String fieldName, Throwable t)
/*      */     throws SAXException
/*      */   {
/*  253 */     ValidationEvent ve = new ValidationEventImpl(1, t.getMessage(), getCurrentLocation(fieldName), t);
/*      */
/*  255 */     reportError(ve);
/*      */   }
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

/*     */   {
/* 112 */     if ((e instanceof SAXException))
/*     */     {
/* 116 */       throw ((SAXException)e);
/*     */     }
/* 118 */     ValidationEvent ve = new PrintConversionEventImpl(1, e.getMessage(), new ValidationEventLocatorImpl(caller), e);
/*     */
/* 121 */     serializer.reportError(ve);
/*     */   }
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

/*     */   }
/*     */
/*     */   public static void handleTypeMismatchError(XMLSerializer serializer, Object parentObject, String fieldName, Object childObject)
/*     */     throws SAXException
/*     */   {
/* 130 */     ValidationEvent ve = new ValidationEventImpl(1, Messages.TYPE_MISMATCH.format(new Object[] { getTypeName(parentObject), fieldName, getTypeName(childObject) }), new ValidationEventLocatorExImpl(parentObject, fieldName));
/*     */
/* 138 */     serializer.reportError(ve);
/*     */   }
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

        }
        Throwable linkedException = exception.getCause();
        if(linkedException instanceof EclipseLinkException) {
            linkedException = exception.getCause();
        }
        ValidationEvent event = new ValidationEventImpl(severity, exception.getLocalizedMessage(), eventLocator, linkedException);
        if (!eventHandler.handleEvent(event)) {
            if(linkedException instanceof EclipseLinkException) {
                throw (EclipseLinkException) linkedException;
            }
            throw exception;
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

    private void handleException(SAXParseException exception, int severity) throws SAXException {
        ValidationEventLocatorImpl eventLocator = new ValidationEventLocatorImpl(exception);
        if(exception instanceof MarshalSAXParseException) {
            eventLocator.setObject(((MarshalSAXParseException) exception).getObject());
        }
        ValidationEvent event = new ValidationEventImpl(severity, exception.getLocalizedMessage(), eventLocator, exception);
        if (!eventHandler.handleEvent(event)) {
            throw exception;
        }
    }
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

            // assume this exception is not from application.
            // (e.g., when a marshaller aborts the processing, this exception
            //        will be thrown)
            throw (SAXException)e;

        ValidationEvent ve = new PrintConversionEventImpl(
            ValidationEvent.ERROR, e.getMessage(),
            new ValidationEventLocatorImpl(caller), e );
        serializer.reportError(ve);
    }
View Full Code Here

Examples of org.richfaces.event.ValidationEvent

  protected void doDecode(FacesContext facesContext, UIComponent uiComponent) {

    // super.decode must not be called, because value is handled here
    if (isSubmitted(facesContext, uiComponent)) {
      uiComponent.queueEvent(new ValidationEvent(uiComponent));
      uiComponent.queueEvent(new AjaxEvent(uiComponent));
      // Check areas for processing
      if (uiComponent instanceof AjaxComponent) {
        AjaxComponent ajaxComponent = (AjaxComponent) uiComponent;
        Set<String> toProcess = AjaxRendererUtils.asSet(ajaxComponent
View Full Code Here

Examples of org.richfaces.event.ValidationEvent

    AjaxListener listener = new MethodExpressionAjaxListener(listenerExpression);
    validator.addAjaxListener(listener);
   
    HtmlPage page = renderView();
    assertNotNull(page);
    validator.queueEvent(new ValidationEvent(validator));
  }
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.