- Grouped Checkboxes
- Multiple-Selection List Box
Both examples are for a simple form. But what if you are generating a form using a ForEach droplet and want to set an array property in each iteration of the loop. Fortunately it turns out to be relatively easy.
Hidden or Text Inputs
By the way if you try to set the array element directly using the param:index notation as in the following example it will not work.
When submitting the above form you will get this exception.
atg.droplet.DropletException: Can't set an element of the array property without a set
(int index, Object value) method.
The exception message is a red herring, there is no way you can set the element of an array property no matter what kind of set method you create. Trust me, I spent many hours delving into the ATG code to verify this. 🙂