Difference between
version 28
and
version 27:
| At line 3 changed 9 lines. |
| protected Object formBackingObject(HttpServletRequest request) throws ServletException { |
| String userId = request.getParameter("id"); |
|
| if ((userId != null) && request.getMethod().equalsIgnoreCase("get")) { |
| return userManager.getUser(userId); |
| } else { |
| return new User(); |
| } |
| } |
| <th style="vertical-align: top"> |
| <label><fmt:message key="user.roles"/>:</label> |
| </th> |
| <td> |
| <spring:bind path="user.roles"> |
| <select name="${status.expression}" multiple="multiple" style="width: 150px"> |
| <c:forEach items="${roles}" var="role"> |
| <c:forEach items="${status.value}" var="currentRole"> |
| <c:if test="${currentRole.id == role.id}"> |
| <c:set var="selected" value="true"/> |
| </c:if> |
| </c:forEach> |
| <option value="${role.id}" |
| <c:if test="${selected}">selected="selected"</c:if>> |
| ${role.name} |
| </option> |
| <c:remove var="selected"/> |
| </c:forEach> |
| </select> |
| <span class="fieldError">${status.errorMessage}</span> |
| </spring:bind> |
| </td> |
| </tr> |
Back to Sandbox,
or to the Page History.
|