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


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to