// Is the user logged in?
if (!this.loginController.isUserLoggedIn()) {
// No, then no own address book
- return false;
+ throw new IllegalStateException("isOwnAddressbook() has been invoked for a guest account"); //NOI18N
}
// Is same user?
// Check on login
if (!this.isUserLoggedIn()) {
// Not logged in!
- throw new IllegalStateException("isInvisible() was called for guest."); //NOI18N
+ throw new IllegalStateException("isInvisible() has been invoked for a guest."); //NOI18N
}
// Check logged-in first, then invisibility
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core"
>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core"
>
<h:column>
<f:facet name="header">#{msg.SHAREE_USER_NAME}</f:facet>
<ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
- <ui:param name="user" value="#{share.shareUserSharee}" />
+ <f:setPropertyActionListener target="#{share.shareUserSharee}" value="#{profileController.user}" />
</ui:include>
</h:column>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core"
-
- xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
+ xmlns:f="http://xmlns.jcp.org/jsf/core">
<ui:composition template="/WEB-INF/templates/#{loginController.templateType}/#{loginController.templateType}_base.tpl">
<ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_START_SHARING_ADDRESSBOOK}</ui:define>
</div>
<div class="para">
+ <h:outputText id="ownProfileInvisible" class="notice" value="#{msg.USER_NOT_LOGGED_IN}" rendered="#{not loginController.isUserLoggedIn()}" />
+
<h:dataTable id="userList" headerClass="table_header_column" var="user" value="#{addressbookController.allUsersNotSharing()}" rendered="#{loginController.isUserLoggedIn() and not loginController.isInvisible()}">
<f:setPropertyActionListener target="#{user}" value="#{profileController.user}" />
<h:column>
<h:column>
<f:facet name="header">#{msg.USER_NAME}</f:facet>
<ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
- <ui:param name="user" value="#{user}" />
+ <f:setPropertyActionListener target="#{user}" value="#{profileController.user}" />
</ui:include>
</h:column>
</h:column>
</h:dataTable>
- <h:outputText id="ownProfileInvible" class="notice" value="#{msg.USER_NOT_LOGGED_IN}" rendered="#{not loginController.isUserLoggedIn()}" />
-
- <h:outputText id="ownProfileInvible" class="notice" value="#{msg.LOGIN_OWN_PROFILE_INVISIBLE}" />
+ <h:outputText id="ownProfileInvisible" class="notice" value="#{msg.LOGIN_OWN_PROFILE_INVISIBLE}" rendered="#{loginController.isUserLoggedIn() and not loginController.isInvisible()}" />
</div>
<div class="table_footer">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core"
>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core"
>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core"
>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core"
>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core"
>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core"
>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core"
- xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
+ xmlns:f="http://xmlns.jcp.org/jsf/core">
<f:metadata>
<f:viewParam id="addressbookId" name="addressbookId" value="#{addressbookController.addressbookId}" required="true" requiredMessage="#{msg.PARAMETER_ADDRESSBOOK_ID_MISSING}" converterMessage="#{msg.PARAMETER_ADDRESSBOOK_ID_INVALID}" validatorMessage="#{msg.PARAMETER_ADDRESSBOOK_ID_NOT_FOUND}">
<h:outputLabel for="userProfileLink" class="table_label">#{msg.ADDRESSBOOK_OWNER}</h:outputLabel>
<ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
- <ui:param name="user" value="#{addressbookController.addressbookUser}" />
+ <f:setPropertyActionListener target="#{addressbookController.addressbookUser}" value="#{profileController.user}" />
</ui:include>
<h:outputLabel for="addressbookCreated" class="table_label">#{msg.ADDRESSBOOK_CREATED}</h:outputLabel>
<h:outputText id="addressbookStatus" value="#{msg[addressbookController.addressbook.addressbookStatus.messageKey]}" title="#{msg.ADDRESSBOOK_STATUS_TITLE}" />
<f:facet name="footer">
- <c:choose>
- <c:when test="#{loginController.isUserLoggedIn() and not loginController.isInvisible()}">
- <c:choose>
- <c:when test="#{addressbookController.isOwnAddressbook()}">
- <h:link id="startSharing" outcome="login_start_sharing_addressbook" value="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOK_TITLE}" />
- </c:when>
+ <h:outputText id="ownProfileInvible" class="notice" value="#{msg.USER_NOT_LOGGED_IN}" rendered="#{not loginController.isUserLoggedIn()}" />
+ <h:outputText id="ownProfileInvible" class="notice" value="#{msg.LOGIN_OWN_PROFILE_INVISIBLE}" rendered="#{loginController.isUserLoggedIn() and loginController.isInvisible()}" />
- <c:when test="#{addressbookController.isOtherAddressbook()}">
- Bla bla
- </c:when>
- </c:choose>
- </c:when>
- <c:when test="#{not loginController.isUserLoggedIn()}">
- <h:outputText id="ownProfileInvible" class="notice" value="#{msg.USER_NOT_LOGGED_IN}" />
- </c:when>
- <c:otherwise>
- <h:outputText id="ownProfileInvible" class="notice" value="#{msg.LOGIN_OWN_PROFILE_INVISIBLE}" />
- </c:otherwise>
- </c:choose>
+ <ui:fragment rendered="#{loginController.isUserLoggedIn() and not loginController.isInvisible()}">
+ <h:link id="startSharing" outcome="login_start_sharing_addressbook" value="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.isOwnAddressbook()}" />
+
+ <h:outputText value="Bla bla" rendered="#{addressbookController.isOtherAddressbook()}" />
+ </ui:fragment>
</f:facet>
</h:panelGrid>
</ui:define>
<h:column>
<f:facet name="header">#{msg.USER_ID}</f:facet>
<ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
- <ui:param name="user" value="#{user}" />
+ <f:setPropertyActionListener target="#{user}" value="#{profileController.user}" />
</ui:include>
</h:column>
<h:column>
<f:facet name="header">#{msg.USER_NAME}</f:facet>
<ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
- <ui:param name="user" value="#{user}" />
+ <f:setPropertyActionListener target="#{user}" value="#{profileController.user}" />
</ui:include>
</h:column>