- No, also c:set is not right and previous also not. So how can I set a value in a bean from a template?
- moved some components to proper location
- added missing this.
- updated jar(s)
Signed-off-by:Roland Häder <roland@mxchange.org>
@Override
public User getUser () {
- return user;
+ return this.user;
}
@Override
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:outputText styleClass="notice" value="#{msg.ERROR_USER_INSTANCE_NOT_SET}" rendered="#{empty profileController.user}" />
+
+ <h:outputText class="notice" value="#{msg.USER_PROFILE_NOT_PUBLICLY_VISIBLE}" rendered="#{not empty profileController.user and not profileController.isProfileLinkVisible()}" />
+
<h:link id="userProfileLink" outcome="user_profile" title="#{msg.LINK_USER_PROFILE_TITLE}" rendered="#{not empty profileController.user and profileController.isProfileLinkVisible()}">
<h:outputText id="userName" value="#{profileController.user.userName}" />
<f:param name="userId" value="#{profileController.user.userId}" />
</h:link>
- <h:outputText class="notice" value="#{msg.USER_PROFILE_NOT_PUBLICLY_VISIBLE}" />
</ui:composition>
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">
<ui:composition template="/WEB-INF/templates/login/login_base.tpl">
<ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_SHARED_ADDRESSBOOKS}</ui:define>
<div class="para">
<h:dataTable id="sharedAddressbooks" var="share" value="#{shareController.allShares()}" headerClass="table_data_column" summary="#{msg.TABLE_SUMMARY_LOGIN_SHARED_ADDRESSBOOKS}" rendered="#{shareController.isSharingAddressbooks()}">
+ <c:set value="#{share.shareUserSharee}" target="#{profileController}" property="user" />
+
<h:column>
<f:facet name="header">#{msg.SHARED_ADDRESSBOOK}</f:facet>
<h:column>
<f:facet name="header">#{msg.SHAREE_USER_NAME}</f:facet>
- <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
- <f:setPropertyActionListener target="#{share.shareUserSharee}" value="#{profileController.user}" />
- </ui:include>
+ <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl" />
</h:column>
<h:column>
</div>
<div class="para">
- <h:outputText class="notice" value="#{msg.LOGIN_USER_HAS_NOT_SHARED_ADDRESSBOOKS}" rendered="#{shareController.isSharingAddressbooks() == false}" />
+ <h:outputText class="notice" value="#{msg.LOGIN_USER_HAS_NOT_SHARED_ADDRESSBOOKS}" rendered="#{not shareController.isSharingAddressbooks()}" />
</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:f="http://xmlns.jcp.org/jsf/core">
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ xmlns:c="http://xmlns.jcp.org/jsp/jstl/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>
<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}" />
+ <c:set value="#{share.shareUserSharee}" target="#{profileController}" property="user" />
<h:column>
<f:facet name="header">#{msg.USER_ID}</f:facet>
<h:outputText value="#{user.userId}" />
<h:column>
<f:facet name="header">#{msg.USER_NAME}</f:facet>
- <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
- <f:setPropertyActionListener target="#{user}" value="#{profileController.user}" />
- </ui:include>
+ <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl" />
</h:column>
<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:f="http://xmlns.jcp.org/jsf/core"
+ xmlns:c="http://xmlns.jcp.org/jsp/jstl/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}">
<ui:define name="content">
<h:panelGrid headerClass="table_header" styleClass="table" columns="2" rendered="#{addressbookController.isAddressbookLoaded()}">
+ <c:set value="#{addressbookController.addressbookUser}" target="#{profileController}" property="user" />
+
<f:facet name="header">#{msg.TABLE_HEADER_SHOW_ADDRESSBOOK}</f:facet>
<h:outputLabel for="addressbookId" class="table_label">#{msg.ADDRESSBOOK_ID}</h:outputLabel>
<h:outputText id="addressbookName" value="#{addressbookController.addressbookName}" />
<h:outputLabel for="userProfileLink" class="table_label">#{msg.ADDRESSBOOK_OWNER}</h:outputLabel>
- <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
- <f:setPropertyActionListener target="#{addressbookController.addressbookUser}" value="#{profileController.user}" />
- </ui:include>
+ <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl" />
<h:outputLabel for="addressbookCreated" class="table_label">#{msg.ADDRESSBOOK_CREATED}</h:outputLabel>
<h:outputFormat id="addressbookCreated" value="#{addressbookController.addressbook.addressbookCreated.time}" title="#{msg.ADDRESSBOOK_CREATED_TITLE}">
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">
<ui:composition template="/WEB-INF/templates/#{loginController.templateType}/#{loginController.templateType}_base.tpl">
<ui:define name="login_title">#{msg.PAGE_TITLE_USER_LIST}</ui:define>
</div>
<h:dataTable id="userList" var="user" value="#{userController.allVisibleUsers()}" headerClass="table_header_column25" summary="#{msg.TABLE_SUMMARY_USER_LIST}" rendered="#{userController.isVisibleUserFound()}">
+ <c:set value="#{share.shareUserSharee}" target="#{profileController}" property="user" />
<h:column>
<f:facet name="header">#{msg.USER_ID}</f:facet>
- <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
- <f:setPropertyActionListener target="#{user}" value="#{profileController.user}" />
- </ui:include>
+ <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl" />
</h:column>
<h:column>
<f:facet name="header">#{msg.USER_NAME}</f:facet>
- <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
- <f:setPropertyActionListener target="#{user}" value="#{profileController.user}" />
- </ui:include>
+ <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl" />
</h:column>
<h:column>
<f:facet name="header">#{msg.USER_CREATED}</f:facet>
- <h:outputFormat id="userCreated" value="#{user.userCreated.time}" title="#{msg.USER_CREATED_TITLE}">
- <f:convertDateTime for="addressbookCreated" type="both" timeStyle="short" dateStyle="medium" />
- </h:outputFormat>
+ <h:outputFormat id="userCreated" value="#{user.userCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
</h:column>
<h:column>