please guide me on how to use partial rendering properly..
overview:
initial display, [All Area] radiobutton is selected, table is invisible.
upon [Route Data] radiobutton clicked, table will become loaded by Route Data.
upon [Residential Data] radiobutton clicked, table will become loaded by Residential Data.
upon loading of data, partial rendering is executed..
when I check the checkbox to do multi select.. then click the [Execute] button it will not bind to selectedRxxxxItemIdList on the first time..
but..
it will bind on the second time you click the [Execute] button...
here's the main jsp: view-main.jsp
partial jsp: view-dataTable.jspCode:<form:form modelAttribute="modelView"> <table> <tr> <td> <form:radiobutton id="allArea" path="allArea" value="All Area" onclick="Spring.remoting.submitForm(taishoZukeiObj.id, document.forms[0].id, { _eventId:taishoZukeiObj.id});"/>All Area </td> <td> <form:checkbox id="routeMode" path="routeMode"/>Route Mode </td> <td colspan="2"> <form:checkbox id="residentialMode" path="residentialMode"/>Residential Mode </td> </tr> <tr> <td style="vertical-align: top;"> <br/> <form:radiobutton id="loadRouteData" path="targetMode" value="ROUTE" onclick="Spring.remoting.submitForm(this.id, document.forms[0].id, { _eventId:this.id, fragments: 'view-dataTable' });"/>Route Data <br/> <form:radiobutton id="loadResidentialData" path="targetMode" value="RESIDENTIAL" onclick="Spring.remoting.submitForm(this.id, document.forms[0].id, { _eventId:this.id, fragments: 'view-dataTable' });"/>Residential Data <br/> </td> <td colspan="3"> <tiles:insertAttribute name="view-dataTable" /> </td> </tr> </table> <!-- buttons --> <table > <tr> <td></td> <td><input type="submit" id="_eventId_execute" name="_eventId_execute" value="Execute" /></td> <td><input type="button" id="back" name="back" onclick="location.href='${flowExecutionUrl}&_eventId=back'" value="Back" /></td> </tr> </table> </form:form>
Code:<div id="view-dataTable"> <form:form modelAttribute="modelView"> <table <c:if test = "${ ! (modelView.targetMode == 'ROUTE') }">style="display: none;"</c:if>> <c:forEach var = "route" items = "${modelView.routeList}" varStatus="status" > <tr id = 'ROUTE${modelView.SLinkId}'> <td> <form:checkbox path="selectedRouteItemIdList" value="${route.SLinkId}" /> </td> <td> ${route.SLinkId} </td> </tr> </c:forEach> </table> <table <c:if test = "${ ! (modelView.targetMode == 'RESIDENTIAL') }">style="display: none;"</c:if>> <c:forEach var = "residential" items = "${modelView.residentialList}" varStatus="status" > <tr id = 'RESIDENTIAL${modelView.SLinkId}'> <td> <form:checkbox path="selectedResidentialItemIdList" value="${residential.SLinkId}" /> </td> <td> ${residential.SLinkId} </td> </tr> </c:forEach> </table> </form:form> </div>



Reply With Quote