Hi, I'd really appreciate some help on this one. I'm using a *.vm file to generate an xml request. The elements in the request are populated from parameters passed from a html form. I have a series of checkboxes whose values I want to pass to the velocity/xml template. Here's a snippet of the template which I want to populate:
So say I have a 5 checkboxes on my form and the user checks 3 of them, how to I pass the values to this template so that the vas:RespondWith> tag is only generated 3 times?
I hope you know how velocity works. It has something called the velocity context and whatever objects you put in there , are available to the vm files during its processing.
So make an arraylist with the values that you have collected from your HTML and put that in velocity context and use for loop of VTL (Velocity Template Language) for populating in the final output(XML in your case).