users@woodstock.java.net

Re: Updating a bubble via Ajax

From: Ryan Burrows <rhburrows_at_gmail.com>
Date: Thu, 8 Nov 2007 16:43:54 -0800

I finally tracked down the issue.

The javascript error was resulting because my web.xml was set up to
redirect to an error page when a the http server returned a 500 error
code. This resulted in it trying to process something that it wasn't
expecting.

The server error happened because this is an existing project I am
trying to move from using richfaces over to using woodstock. My hope
was that I could do it one page at a time without removing richfaces
until completely finished, but it looks like that isn't possible.
Pulling the richfaces jars out of the classpath caused the error to
disappear entirely.

Thanks again for your help.

Ryan

On Nov 8, 2007 2:12 PM, Dan Labrecque <Dan.Labrecque_at_sun.com> wrote:
>
> It's fairly simple, really. Just add the jars to the class path and
> configure the web.xml.
>
> I performed a quick test to refresh the bubble and it seems to be working
> fine. Again, the only time I've ever seen this error is when the JSF
> lifecycle param is not set properly. If I unset the param in the web.xml, I
> immediately get the same error.
>
> Perhaps you can look at the URLs below and see if anything looks familiar?
> You might also consider asking your question on the JSF Extensions
> users_at_jsf-extensions.dev.java.net alias. There might be something about your
> Facelets environment that we're not familiar with?
>
> https://jsf-extensions.dev.java.net/issues/show_bug.cgi?id=83
>
> https://jsf-extensions.dev.java.net/servlets/ReadMsg?listName=users&msgNo=17
>
> Dan
>
>
>
> Ryan Burrows wrote:
> Yes, both of those jars are in my classpath. The exception being
> thrown is actually coming from within the jsf-extensions-dynamic-faces
> jar. Is there some additional setup required for these?
>
> On Nov 8, 2007 1:25 PM, Dan Labrecque <Dan.Labrecque_at_sun.com> wrote:
>
>
> That is:
>
> jsf-extensions-common-0.1.jar
> jsf-extensions-dynamic-faces-0.1.jar
>
>
>
> Dan Labrecque wrote:
> Do you have the JSF Extensions jar in your class path?
>
> Ryan Burrows wrote:
> Hi Dan,
>
> Thanks for the quick reply. Unfortunately I already have my faces
> servlet specified how you demonstrate in my web.xml. I also (out of
> curiosity) tried removing the
> <init-param>
> <param-name>javax.faces.LIFECYCLE_ID</param-name>
> <param-value>com.sun.faces.lifecycle.PARTIAL</param-value>
> </init-param>
> part, and in that case everything processes without an exception, but
> the entire page refreshes and all Woodstock components disappear.
>
> Do you have any other ideas of what might cause this issue?
>
> Thanks again,
> Ryan
>
> Dan Labrecque wrote:
>
>
> This is a classic symptom of not properly defining the
> javax.faces.LIFECYCLE_ID parameter. Ensure your web.xml file has the
> following entries.
>
> <!-- Faces Servlet -->
> <servlet>
> <servlet-name>FacesServlet</servlet-name>
> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> <init-param>
> <param-name>javax.faces.LIFECYCLE_ID</param-name>
> <param-value>com.sun.faces.lifecycle.PARTIAL</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> Dan
>
> Ryan Burrows wrote:
>
>
> Hi,
>
> I'm currently working on a project that uses the Woodstock components
> with Facelets. I have a bubble that changes its content depending on
> the choice that is picked from a dropdown. To do this I specified
> javascript like the following for the onChange attribute of the
> dropdown:
>
> document.getElementById('form:bubbleId').refresh('form:dropdownId')
>
> When the call to refresh is made there is an error from
> com_sun_faces_ajax.js that says "I has no properties". Also, an
> exception is thrown from the Faces Servlet that says
>
> Class returned from AsyncResponse.getPartialTraversalViewRoot must be
> a UIComponent
>
> Messages I have found about related errors seem to indicate that the
> fix is setting the LIFECYCLE_ID parameter to PARTIAL in the web.xml,
> but this seems to have no affect. I know that the content of the
> bubble is updated properly when the dropdown gets submitted (tested by
> adding a button that refreshes the entire form), but it isn't even
> hitting the set method on it. Does anyone have an idea of what could
> be causing this issue?
>
> Thanks,
> Ryan Burrows
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>
>
>
>