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 21:52:57 -0700

OK, still not understanding exactly what you're doing. But let me make
a guess.

You're updating a section of your page with an ajax call, yes?

That section of page is larger than the single component which you've
written, right? Maybe, say, @form?

Just a guess. That's one thing that would explain what you're seeing.
There are others, but without details, it's hard to say.

If so, why not just update only that component?

But this is only guessing - you haven't really said much about what
you're doing.

Jim

On 8/18/09 9:14 PM, webtier_at_javadesktop.org wrote:
> I don't have the source so I don't know who is calling startUpdate. From reading the spec and the API doc I'm suspecting PartialViewContext.processPartial just because it's his job to update the components on his list. It could also be UIComponentBase, it doesn't say. UIInput (the class I'm extending) doesn't have any encode methods.
>
> It would make sense to do it that way if your components are all simple and not ajax-aware, but I hope there's a way around it for those where it matters.
>
> If I do what I said above, I get "IllegalStateException: CDATA tags may not nest" in the glassfish log.
>
> If I put in a call to endUpdate before I start the eval, and a startUpdate after ending the eval, then the server part runs to completion, but the client side fails while trying to update the DOM, presumably because of the empty update tag. But I can print the response on the client side with an onevent handler, and there it is, an update element with an empty CDATA, an eval with my output, and another update with an empty CDATA.
> [Message sent by forum member 'judys' (judys)]
>
> http://forums.java.net/jive/thread.jspa?messageID=361089
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>