Am 11.05.11 14:40, schrieb Scott O'Bryan:
k there is a number of issues with what you are doing
here. As you probably know, TRINIDAD's ajax is not 'solely' about
content delivery. It runs the JSF lifecycyle and updates the view
state and a bunch of other things. While I don't know exactly why
it's failing, I'm not surprised it is.
Actually from my personal guess it is a lost viewstate because the jsf
lifecycle is bypassed. The reason for pure jquery ajax probably being a
little bit more responsive is the lack of the lifecycle handling.
I assume the you are in a jsf2 environment, if you look at the response
a jsf2 ajax call gives back there is always a viewstate variable
returned in the response protocol which is generated from the server and
if you bypass jsf this value either is lost or you might have an old
value when you try to push the next jsf operation after the ajax call.
If you are in a JSF 1.x environment Trinidad I guess has something
similar to keep the client in sync with the server viewstate.
> I'm wondering if you couldn't do the same thing your trying to
> accomplish usig JQuery by using Trinidad's Ajax instead.
I second that use jquery only for pure client operations and jqueries
ajax only for the parts wich never touch jsf, if you want to go against
jsf always use the plain jsf 2 jsf or whatever meta layer the underlying
component lib provides.
Jquerys ajax is just a thin wrapper over the standard ajax mechanisms
and does not have server side webframeworks in mind which have to deal
with additional bookkeeping.
Werner