[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1730) Injecting uiComponent with required = false fails with NPE if FacesContext is not available
Daniel Young (JIRA)
jira-events at lists.jboss.org
Thu Jul 26 21:25:54 EDT 2007
Injecting uiComponent with required = false fails with NPE if FacesContext is not available
-------------------------------------------------------------------------------------------
Key: JBSEAM-1730
URL: http://jira.jboss.com/jira/browse/JBSEAM-1730
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.BETA1
Reporter: Daniel Young
Assigned To: Gavin King
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