[jbossseam-issues] [JBoss JIRA] Resolved: (JBSEAM-1750) Accessing handledException through EL broken

Norman Richards (JIRA) jira-events at lists.jboss.org
Wed Aug 1 17:17:49 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-1750?page=all ]

Norman Richards resolved JBSEAM-1750.
-------------------------------------

    Resolution: Won't Fix

The problem seems to be that the getMessage(int) method on HibernateException confuses the EL evaluator.  I don't know if it is "legal" for a JavaBean to have a method like that, so it may or may not be a bug on the part of the EL code.  Unfortunately, the offending class (javax.el.BeanELResolver) is outside of Seam and jboss-el, so I'm not sure this is fixable by us.

Fortunately, in this case, there is a very easy workaround.  Instead of using #{org.jboss.seam.handledException.message}, use #{org.jboss.seam.handledException.messages[0]}.  If you are on Seam 2 using JBoss EL, you can also use #{org.jboss.seam.handledException.getMessage()}.  





> Accessing handledException through EL broken
> --------------------------------------------
>
>                 Key: JBSEAM-1750
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1750
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.1.GA
>            Reporter: Samuel Mendenhall
>         Assigned To: Norman Richards
>            Priority: Minor
>             Fix For: 2.0.0.CR1
>
>
> Bean:
> throw new HibernateException("Test");
> pages.xml:
> <exception class="org.hibernate.HibernateException">
> 	<end-conversation/>
> 	<redirect view-id="/error.xhtml">
> 	    <message severity="WARN">#{org.jboss.seam.handledException.message}</message>
> 	</redirect>
>     </exception> 
> I am correctly redirected to the error.seam page however the message is empty and in my console I have:
> 11:52:47,571 WARN  [Interpolator] exception interpolating string: #{org.jboss.seam.handledException.message}
> javax.faces.el.PropertyNotFoundException: Bean: org.hibernate.HibernateException, property: message
> ....
> Furthermore, the documentation says to use #{handledException.message} which is incorrect, it should be #{org.jboss.seam.handledException.message}.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list