Hi
Velocity 1.2 has a serious bug which affects web Velocity pages.
Where you have arrays of form fields e.g. amount repeated say 5 times
on a page for a column of numbers, you have an array, say a int[]
amount in your WebWork action.
You need a setAmount(int[] amount) method for the Servlet to populate
the array in accordance with the Servlet specification.
Here is the problem:
for each in Velocity does not handle array primitives.
So you need to provide an accessor which returns a list say:
public ArrayList getAmount() {...}
This is annoying. Where it gets really annoying is that the above
chokes Velocity as well.
The getter having a separate type to the setter chokes Velocity. You
need a different method base name.
e.g. public ArrayList getAmountAsArrayList() {...}
This will now work.
Now take the above and multiply it over a whole project. It is
confusing enough doing these workarounds in a single page.
The reason I am posting this here and not on the Velocity newsgroup is
that this bug in Velocity was fixed about a year ago.
Further Velocity 1.3RC2 with this bug and about 50 others fixed has
been available since last July last year.
WebWork 1.3 still comes with Velocity 1.2. Replacing 1.2 with Velocity
1.3 breaks it. So before I spend a ton of time looking at this I have
some questions:
1. Why has no-one else reported this. Are we the only ones using
WebWork/Velocity? There was another post this week from Mark Spooner
but no answers to it.
2. Does anyone know why WebWork is not using Velocity 1.3?
3. Is there any major reason why Velocity 1.3 cannot be integrated?
We have to commit to using WebWork on our project soon. So far we have
been a bit overwhelmed by bugs in WebWork and Velocity together with
poor to non-existent documentation
which has so far negated the speed we should have gotten from using it.
I am happy to remedy this by submitting our documentation to the
project. We also have a growing Velocimacro library to do useful screen
widgets akin to a tag library which we can add.
Thanks
Greg Luck
-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork