HibernateRelationshipsUI |
|
Your trail: |
Difference between
version 31
and
version 30:
At line 183 changed 2 lines. |
# Change Weblog.users to List from Set |
# Make WeblogDAO Transactional by moving bean definition to -service.xml and wrapping it with a txProxy |
In order to view and edit the Users associated with a Weblog, you need to add some code to __weblogForm.jsp__ that will allow you to do this. After the "dateCreated" row, add the following: |
|
[{Java2HtmlPlugin |
|
<tr> |
<th class="tallCell"><fmt:message key="weblogForm.users"/>:</th> |
<td> |
<nested:iterate property="users" id="user" indexId="index"> |
<nested:hidden property="password"/> |
<nested:hidden property="confirmPassword"/> |
<nested:text property="username" readonly="true"/> |
<nested:text property="firstName"/> <nested:text property="lastName"/> |
<nested:hidden property="addressForm.city"/> |
<nested:hidden property="addressForm.province"/> |
<nested:hidden property="addressForm.country"/> |
<nested:hidden property="addressForm.postalCode"/> |
<nested:hidden property="passwordHint"/> |
<nested:hidden property="website"/> |
<nested:hidden property="email"/> |
<nested:hidden property="version"/> |
<nested:hidden property="enabled"/> |
Roles: |
<c:forEach var="role" items="${user.roles}" varStatus="status"> |
<c:out value="${role.name}"/><c:if test="${!status.last}">,</c:if> |
<input type="hidden" name="users[<%=index%>].userRoles" value="<c:out value="${role.name}"/>" /> |
</c:forEach> |
<br /> |
</nested:iterate> |
</td> |
</tr> |
}] |
|
Back to HibernateRelationshipsUI,
or to the Page History.
|