You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Antonio Gallardo <ag...@agssa.net> on 2004/02/11 14:08:42 UTC

[Woody] calculated widgets (formula widgets).

Hi:

If we need to display some calculated fields (formulas) using woody, what
is the best approach?

1-Using widget <wd:on-value-changed>
2-Processing EventListener
3-Javascript (client side).

1- I already tried it, but the problem is that we need to use <wi:styling
submit-on-change="true"/>. AFAIK this is not elegant because on every
change a roundtrip is fired. Also if some other widgets are requiered,
then after the roundtrip, the form show validations errors on this widgets
too. :-(

2-No currently implemented, but I think the problem is similar as the
explained above.

3-I think the lastest is the best, since we don't need to roundtrip to the
server in order to display the formula.

The problem I see is how to embed some javascript (client side) on Woody
form. In order to implement it we need to handle a @onload event with a JS
funtion on <body> + some @onchange on the widgets that are part of the
formula.

Can someone already implemented this? Is this posible? Please comment.

Best Regards,

Antonio Gallardo