webtier@glassfish.java.net

Re: [webtier] Cant generate a ajax response containing eval

From: Jim Driscoll <Jim.Driscoll_at_Sun.COM>
Date: Fri, 04 Dec 2009 14:10:32 -0500

This is a bug, and I'm glad to see you already filed it.

The workaround, as I've already posted in the bug, is to include the
script inline, inside the element you are updating... Inline scripts
are eval'd automatically, before any other dom changes are applied,
making <eval> blocks mostly unnecessary.

Hope this solves your issue - if not, the fix will take a spec change,
which can take a bit of time.

Jim


On 12/4/09 1:15 PM, webtier_at_javadesktop.org wrote:
> Hi,
>
> I've wrote a custom component with ajax functionality. I need to send a small javascript to be eval'd at specific events.
>
> So I generate the following script to trigger ajax requests:
>
> jsf.ajax.request('mycomp', null, { execute: 'mycomp', render: 'mycomp' });
>
> Unfortunately, I get this message in the server log at every ajax request:
>
> CDATA tags may not nest
>
> It seems class PartialViewContextImpl.PhaseAwareVisitCallback always calls PartialResponseWriter.startUpdate which always starts a CDATA block, so I'm unable to append my eval block.
>
> I'm using Mojarra 2.0.2 b10.
>
> Thanks
> [Message sent by forum member 'lehphyro' ]
>
> http://forums.java.net/jive/thread.jspa?messageID=374780
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>