Interested in working on a list of objects with JavaScript, potentially using ExtJS as well in the project. There are two lists in the JSP file (modelList and categoryList) forwarded by the controller, and the goal is to access data in both lists. Is this achievable?
JSP code snippet:
<table class="form">
<tr>
<td class="label"><a class="required"></a><spring:message code="serviceModel.category" /></td>
<td class="value">
<form:select path="category" onchange="javascript:App.reloadUserNumberOnCategoryChangeForWorkflow(this, ${categoryList}, ${modelList}) ;App.removeError(this)>
<form:option label="" value="" />
<form:options items="${categoryList}" itemLabel="description" itemValue="description" />
</form:select>
<form:errors path="category" cssClass="errormsg" />
</td>
</tr>
<tr>
<td class="label"><a class="required"></a><spring:message code="service.userNumber" /></td>
<td class="value">
<form:select path="userNumber">
<form:option label="" value="" />
<form:options items="${modelList}" itemLabel="description" itemValue="description" />
</form:select>
<form:errors path="userNumber" cssClass="errormsg" />
</td>
</tr>
</table>
Controller code snippet:
uiModel.addAttribute(WebConstants.CATEGORY_LIST, catList);
uiModel.addAttribute(WebConstants.MODEL_LIST, modelList);