On 2/9/07, Ingo Düppe <[EMAIL PROTECTED]> wrote:
Hi,
I ran in the following issue:
I have an EnrollmentPage class with a the property
@Property{value="#{param.enrollmentId}")
private Long enrollmentId;
And this ends up that shale calls during the restore view phase the
javax.faces.convert.LongConverter of MyFaces-1.1.5-SNAPSHOT.
During the restore phase variable the the
javax.faces.convert.LongConverter getAsObject method is called. This
method expects an uiComponent otherwise it throws a
NullPointerException. But this method is called by the
org.apache.shale.util.ConverterHelper during create view and therefore
the facesContext setViewRoot is not called and null. So the below code
end ups in a NullPointerException in this situation.
public Object asObject(FacesContext context, Class type, String value)
{
if (String.class == type) {
return value;
}
return converter(context, type).getAsObject(context,
context.getViewRoot(), value);
}
Is this an issue?
Yes, that does sound like a legitimate issue ... could you add a ticket to
our JIRA[1] for it? The interesting part of the problem is it might actually
be a JSF implementation thing ... we'll need to explore whether the same
behavior happens when you use a <managed-property> entry in web.xml to
configure the property setter, and also whether it happens with the RI as
well.
Regards
Ingo
Craig
[1] https://issues.apache.org/struts/browse/SHALE