You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2008/09/16 22:55:05 UTC
[S2] Velocity Integration
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
All,
I'm an S1 user and a member of the Velocity team. I recently posted a
message to the velocity-dev list regarding the ugly syntax required by
the S2 tag Velocity implementation.
For reference:
http://www.nabble.com/Named-macro-parameters-td19459070.html
The gist of the question was: can Velocity support a better syntax so
that stringified "name=value" parameter pairs didn't have to be
re-parsed for every run-through of the template.
After a bit of back-and-forth Nathan Bubna showed that an on-the-fly Map
can be used to make the syntax look similar to the JSP/fm
implementations, but does not require the string parsing of each macro
parameter. Something like this:
#sform({'action' : 'updatePerson' })
#stextfield({'label' : 'First name', 'name' : 'firstName'})
#ssubmit({'value' = 'Update'})
#end
(Written to match the examples on this page:
http://struts.apache.org/2.0.11.2/docs/velocity-tags.html)
I wonder if there's any interest in supporting this type of Velocity
integration in order to avoid parsing the name/value strings that arise
from this syntax:
#sform ("action=updatePerson")
#stextfield ("label=First name" "name=firstName")
#ssubmit ("value=Update")
#end
Just a thought.
Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkjQHSkACgkQ9CaO5/Lv0PBMxgCfdFwv1GeJoYnXS3umaQIhbPrY
BJ0AnRaVfBCsisTq/zxQZq3+XVnsRIsy
=iH+5
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] Velocity Integration
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Christopher Schultz wrote:
>
> I'm an S1 user and a member of the Velocity team. I recently posted a
> message to the velocity-dev list regarding the ugly syntax required by
> the S2 tag Velocity implementation.
>
>
Hi Chris,
It's probably worth posting to the struts-dev list with a more specific
subject line.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org