webtier@glassfish.java.net

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

From: <webtier_at_javadesktop.org>
Date: Tue, 18 Aug 2009 21:14:49 PDT

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