Skip to main content

How to get Entry index while JAXB Verification

3 replies [Last post]
veda
Offline
Joined: 2005-08-09

Hi,
I tried in the following way and i am not getting entry index to find which entry is failed during verification.

ValidationEventHandler handler = new ValidationEventHandler()
{
public boolean handleEvent(ValidationEvent event)
{
System.out.println(" "+event.getMessage());
return true;
}
};
pupilsVerifier.check(handler, po);

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kohsuke
Offline
Joined: 2003-06-09

sorry, I don't know what you mean by the "entry index".

veda
Offline
Joined: 2005-08-09

I mean which record or entry has validation fail

kohsuke
Offline
Joined: 2003-06-09

ValidationEvent.getLocator().getObject() should tell you the object that caused a problem.