webtier@glassfish.java.net

Re: [webtier] JSF2: using JavaScript to update a component

From: Jim Driscoll <Jim.Driscoll_at_Sun.COM>
Date: Tue, 18 Aug 2009 15:48:36 -0700

I'm afraid I don't understand your question... What class is calling
startUpdate?

Jim

On 8/18/09 2:15 PM, webtier_at_javadesktop.org wrote:
> My components (porting from 1.2) currently use JavaScript/JSON for Ajax updates, so I would like to put something like the following in my renderer's encodeEnd method:
>
> if (context.getPartialViewContext().isAjaxRequest()) {
> PartialResponseWriter w = (...) context.getResponseWriter();
> w.startEval();
> w.write("myUpdateFunction(<some JSON>);");
> w.endEval();
> }
>
> By the time my renderer's encodeEnd gets called, someone has (understandably) already called the responseWriter's startUpdate, and I get a nested CDATA error. Closing the update first doesn't work either. What should I be doing to prevent the startUpdate call being made?
> [Message sent by forum member 'judys' (judys)]
>
> http://forums.java.net/jive/thread.jspa?messageID=361050
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>