users@woodstock.java.net

Re: submit (), refresh () and filter

From: Wei Chiang <chiang.wei_at_riihonlahti.com>
Date: Fri, 28 Mar 2008 18:26:38 +0200

Ken,

Thanks for your reply.
>
> I'm sure you can do something in a filter to break things. :) But I
> don't think the nature of a filter alone will have any effect on this.
I don't think so either. I took out one filter that I thought could
cause the trouble, and the result was still the same.

> The code that is throwing an exception appears to be doing so b/c the
> PartialTraversalViewRoot is not a UIComponent. I'm 99% sure this
> means its (null) as it is always a UIComponent.
>
> It could be null if the FacesContext is null. Or if the ViewRoot to
> be created is created as something other than a
> PartialTraversalViewRoot implementation (i.e. the normal UIViewRoot).
> The 2nd cause should not happen unless you've done something to
> configure how JSF creates the ViewRoot (perhaps used a framework like
> Ajax4JSF, or some other framework); this is the configuration that
> ensure a proper ViewRoot is created (this is done for you automatically):
>
> <component>
> <component-type>javax.faces.ViewRoot</component-type>
>
> <component-class>com.sun.faces.extensions.avatar.components.PartialTraversalViewRootImpl</component-class>
>
> <component-extension>
> <component-family>javax.faces.ViewRoot</component-family>
> </component-extension>
> </component>
>
I don't use Ajax4JSF, but I do use Spring Framework to configure beans.
I suspect there may be some configuration problem with Spring Framework
when using Woodstock's AJAX.

I didn't understand the above component section, are you saying that I
should (or should not) have it included in the configuration file. I
don't have it in my configuration file, I thought it would be included
in some configuration file of Woodstock's jar file.

 
> The ViewRoot will be null if the FacesServlet is not executed. In
> your stack trace, I do not see the FacesServlet, however, I'm not sure
> if there's more to it than this. I'm guessing that is your problem.
>
I wonder if it has something to do with the bean being serialized by
Spring framework?
After posting the mail, I set the "submitForm" to "true" and the event
listener gets called and things work as it should be. Of course, then
it is not AJAX.


Thanks,
Wei