[jboss-user] [JBoss Seam] - Re: error message & trinidad

pete.muir@jboss.org do-not-reply at jboss.com
Sat Dec 22 12:31:32 EST 2007


"ebu" wrote : it is indeed, otherwise there would be no InvalidStateException. The problem appeared to be quite obvious - this exception just was not catched. After reading validation part of seam ref i somehow decided that seam cares about catching validation exception itself. 

No, completely wrong. The InvalidStateException is thrown by hibernate as it tries to persist the invalid entity. The ModelValidator checks for *potentially invalid* values *before* the entity is persisted. So the reason you get the InvalidStateException is that the ModelValidator isn't running during the JSF validation phase, the error, therefore isn't being reported to JSF and is instead thrown when you flush the persistence context.


anonymous wrote : the only problem i still have is that  trinidads inputText tag doesn't want to show messages forcing me to use h:inputTag with h:message instead...
  | Havn't somebody had some issues with using trinidad to display messages?

Try doing it properly using s:validate... As I said, check why the ModelValidator isn't being attached by s:validateAll.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115194#4115194

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115194



More information about the jboss-user mailing list