dimanche 24 janvier 2016

velocity break loops if checkbox is checked

I'm using apache velocity in a web application (just for experimentation and practice) for example:

<input id="limited" type="checkbox"> &nbsp;<strong>Limited view</strong>

so I need a code which would be... if the checkbox above is checked then do this:

#foreach( $customer in $customerList )
#if( $velocityCount > 5 )
    #break
#end
$customer.Name
#end

else then don't break it

is that kind of syntax possible? and if yes then can you show me how?

please no rude comments, I'm just trying to learn... can anyone help?




Aucun commentaire:

Enregistrer un commentaire