- Well, ui:fragment is according to my trainer not right. What I want here is a navigation to edit/delete/lock/unlock pages depending on the user's account status.
- If the account status is UNCONFIRMED, currently only show edit and delete
- If it is CONFIRMED, add a link to "lock" page.
- If it is LOCKED, add a link to "unlock" page.
- Currently I do this with ui:fragment because it seems to be the only JSF tag that is NOT rendering it's body when the rendered attribute resolves to false.
- If you can find a drop-in replacement, please notify me at roland[AT]mxchange[DOT]org
- And please keep in mind that c:if or anything like that is JSP which is being executed on an other life-cycle step than JSFs.
</h:link>
</li>
- <li>
- <h:link outcome="admin_unlock_user" value="#{msg.ADMIN_LINK_UNLOCK_USER}" title="#{msg.ADMIN_LINK_UNLOCK_USER_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}">
- <f:param name="userId" value="#{beanHelper.user.userId}" />
- </h:link>
+ <ui:fragment rendered="#{beanHelper.user.userAccountStatus != 'UNCONFIRMED'}">
+ <li>
+ <h:link outcome="admin_unlock_user" value="#{msg.ADMIN_LINK_UNLOCK_USER}" title="#{msg.ADMIN_LINK_UNLOCK_USER_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}">
+ <f:param name="userId" value="#{beanHelper.user.userId}" />
+ </h:link>
- <h:link outcome="admin_lock_user" value="#{msg.ADMIN_LINK_LOCK_USER}" title="#{msg.ADMIN_LINK_LOCK_USER_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}">
- <f:param name="userId" value="#{beanHelper.user.userId}" />
- </h:link>
- </li>
+ <h:link outcome="admin_lock_user" value="#{msg.ADMIN_LINK_LOCK_USER}" title="#{msg.ADMIN_LINK_LOCK_USER_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}">
+ <f:param name="userId" value="#{beanHelper.user.userId}" />
+ </h:link>
+ </li>
+ </ui:fragment>
<li>
<h:link outcome="admin_delete_user" title="#{msg.ADMIN_LINK_DELETE_USER_TITLE}">