Thanks for the suggestion. But I'll stick with Facelets, which we have
been using for a few months already.
For the issue, I've found out what's causing it. For some reason, the
ViewRoot component setting in the DynaFaces jar wasn't picked up by
JSF. Explicitly set the component in the WEB-INF/faces-config.xml file
seems to fix the problem, as in the followings,
<!-- BEGIN of jsf-extension workaround for Facelets -->
<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>
<!-- END of jsf-extension workaround for Facelets -->
As to the "why" part, I'll leave it to the real experts.
Thanks,
--
xfin
--- Ken Paulsen <Ken.Paulsen_at_Sun.COM> wrote:
>
> Hi xflin,
>
> It appears that the UIViewRoot is null when it is throwing the
> exception. I haven't used your exact configuration, so I'm not sure
> I
> can provide much more help. You might try irc.freenode.net ##jsf.
> There are a lot of Facelets users on there... and even Ed Burns
> (author
> of DynaFaces) is there often.
>
> The environment I do use is JSFTemplating + DynaFaces (I've even
> blogged
> about it:
>
http://blogs.sun.com/paulsen/entry/jsftemplating_dynamicfaces_easy_ajax).
>
> JSFTemplating supports the Facelets syntax now (beta quality) and has
>
> many active developers. I can help you if you end up using this.
> You
> can talk to JSFTemplating developers via IRC at: irc.freenode.net
> #JSFTemplating .
>
> Good luck!
>
> Ken
>
> Xiaofeng Lin wrote:
> > I'm wondering if anyone could give a hint of what might cause it.
> >
> > I'm using the 4.1-build7 woodstock with facelets 1.1.12+JSF1.2
> running
> > on Tomcat 6.0.13.
> >
> > When trying to do a little DynaFaces ajax magic, I'm always getting
> an
> > error,
> >
> > SEVERE: Servlet.service() for servlet FacesServlet threw exception
> > java.lang.IllegalStateException: Class returned from
> > AsyncResponse.getPartialTravers
> > alViewRoot must be a UIComponent
> > at
> >
>
com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(Pa
> > rtialTraversalLifecycle.java:117)
> > at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
> > at
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationF
> > ilterChain.java:290)
> > ...
> >
> > The testing facelets page is quite simple,
> >
> > <w:form id="form1">
> > <w:radioButton id="rb1" name="rb1" label="Refresh Button"
> > onClick="refreshText()"/>
> > <w:staticText id="text111" text="!!!#{MyBean.anyText}!!!"/>
> > <w:script>
> > function refreshText() {
> > var domNode = document.getElementById("form1:text111"); // Get
> text
> >
> > return domNode.refresh(); // Asynchronously refresh text
> > }
> > </w:script>
> > </w:form>
> >
> > It works if using JSP, but fails on facelets. Both running on
> Tomcat
> > 6.0.13.
> >
> > Thanks,
> > --
> > xflin
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's
> updated for today's economy) at Yahoo! Games.
> > http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
> > For additional commands, e-mail: users-help_at_woodstock.dev.java.net
> >
> >
>
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC