Ah, that does look a lot better.  I still wish velocity supported
named parameters, but this is better than nothing.  Could you file a
ticket for this improvement please, and if you have time to write a
patch, it would certainly be appreciated :)

Don

On Thu, Sep 18, 2008 at 7:12 AM, Christopher Schultz
<[EMAIL PROTECTED]> wrote:
> 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
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to