[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1628) Injecting uiComponent with required = false fails against Sun RI when component is not present

Daniel Young (JIRA) jira-events at lists.jboss.org
Mon Jul 9 17:27:31 EDT 2007


Injecting uiComponent with required = false fails against Sun RI when component is not present
----------------------------------------------------------------------------------------------

                 Key: JBSEAM-1628
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1628
             Project: JBoss Seam
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.0.0.BETA1
            Reporter: Daniel Young
            Priority: Critical
             Fix For: 2.0.0.CR1


If you inject a UIComponent into a bean as follows:

 @In(required = false, value = "#{uiComponent['XXX']}")

It fails for any method call that occurs on the bean at a time when the component is unavailable under the ViewRoot.

An IllegalArgumentException is thrown by the Sun RI from UIComponentBase:588 if findComponent(id) is unsuccessful, whereas MyFaces simply returns null.  This can be fixed by patching org.jboss.seam.faces.UIComponent to catch the IllegalArgumentException and return null.

We were working around this by avoiding using @In for this and looking under the FacesContext.ViewRoot manually, but eventually decided to patch Seam ourselves until this issue is fixed in CVS.  The above fix is working well for us.


-- 
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