Hani Suleiman wrote:

+1, the valuestack is a neat thing and all that, but having random pushs/pops happen in UI tags of all things just feels wrong.

Agreed. However, I'm unclear why pushes and pops are required though.


#foreach( $number in $person.phoneNumbers )
    $stack.push($number)
    #bodytag(Component "template=numberDisplay.vm")
        #param("phoneNumber" "top")
    #end
    #set ($trash = $stack.pop())
#end

Why wouldn't you just write:

#foreach( $number in $person.phoneNumbers )
    #bodytag( Component "template=numberDisplay.vm" )
        #param( phoneNumber $number )
    #end
#end

Or what I'd be more inclined to write:

#foreach( $number in $person.phoneNumbers )
#tag( Component "template=numberDisplay.vm" "params.phoneNumber=person.phoneNumbers[$velocityCount]" )
#end


Although I do admit the latter is less intuitive than the former.


M




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to