I'm fairly new to Marionette. I've a router that passes parameters. The template has few check boxes, radio button and a multi select list. When the template is rended, the checkbox and radio button behaves as per the parameter values. Im trying to find the right way to pass parameters so that the items in the multi select list box will get populated. Is it possible ? If not, is it possible to retrieve the URL from the router and update the list box in onBeforeShow function ?
My router looks similar to this.
/search/{"isMine":true,"radioButton":"a1"}
and the template is as follows
<input type="radio" name="radioButton">
<input id="isMine" type="checkbox" id="isMine" >
<select name="optionsList" id="optionsList" multiple>
<option value="1"> One < /option>
<option value="2"> Two < /option>
<option value="3"> Three < /option>
</select>
I tried the following but the items in the listbox are never getting selected when the template renders.
#search/{"taken":true,"radioButton":"a1", "optionsList" : ['1','2']}