cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Johnston ...@lojjic.net>
Subject Re: [cforms] fi:validation-errors in AJAX mode
Date Tue, 02 Aug 2005 13:49:17 GMT
Sylvain Wallez wrote:
> Ugo Cei wrote:
>> Looks good to me. AFAIK, Ajax support works only with the template 
>> macros, so it might not make sense to add this feature to the 
>> transformer also. What is the orientation of the community towards the 
>> transformer/macros ambiguity? I'd like to have just one recommended 
>> implementation of this, so if macros are the way to go, what about 
>> deprecating the forms transformer? 
> 
> Well, macros are more powerful because they allow to do more than 
> templating with the widgets. A straightforward example is conditional 
> templating, e.g. displaying "There are now contacts" rather than an 
> empty table. This is not possible with a transformer, unless we add an 
> expression language and some control structures which will make it yet 
> another programming-language-in-XML...
> 
> OTOH, the transformer is useful when JXTG is not a option e.g. when the 
> generator is an XSP...

IIUC you can also use JX as a transformer, so wouldn't that cover this case?

Anyway... to Ugo's question, I believe (correct me if I'm wrong) that 
AJAX works regardless of whether the template is interpreted by JX or 
the FormsTemplateTransformer, since it's the widgets themselves that 
signal whether or not they have been updated by wrapping their SAX 
output in a <bu:replace>.

Personally I usually use FormsTemplateTransformer for most forms, unless 
I know for sure I'm going to need the extra expressive power of JX. 
Mostly because I'm too lazy to jx:import the forms macros resource in 
every template.

--Jason

Mime
View raw message