BURGHARD Éric wrote:

Hi,

Since i'm using xsl2 for all my forms, i'm looking for a way to enable ajax
in FormsGenerator.


Interesting. Can you explain how you use XSLT 2 and the FormGenerator?

After quickly looking through sources, i found that this
feature seems to be planned in the FormsGenerator (FIXME comments).

I guess you're referring to the FIXME in AbstractWidget.generateSaxFragment.

At first glance, i thought that this would be just a matter of copy and
paste of the relevant code from JXMacrosHelper to AbstractWidget, so i
could use the browser-update transformer (exactly like we use to do with
the CForms macros). But by reading the comment (we may want to strip out
completely widgets that aren't updated when in AJAX mode), i'm not sure if
this is the right way to do it.

Will the generator generate the bu tags, or will it generate the tags for
updated widgets only (without bu) ?

If Widget.generateSaxFragment() was producing the bu:replace elements, then that would mostly translate to piping the result of the FormsGenerator through the BUTransformer.

Unfortunately, this is not what happens and it should not happen as the <bu:replace> tag is really a view concern.

A way to achieve this is for widgets to produce an additional updated="true" attribute when they were updates. The FormsGenerator can then easily wrap such widget elements with a <bu:replace> that can then be consumed by the BUTransformer and whatever comes next.

I need some enlightment just to be able to contribute cleanly to this really
cool feature (thx sylvain).

Hope this helped :-)

Sylvain

--
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director

Reply via email to