]> git.mxchange.org Git - addressbook-war.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Tue, 20 Oct 2015 13:03:14 +0000 (15:03 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 20 Oct 2015 13:14:32 +0000 (15:14 +0200)
- 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>

lib/jcontacts-core.jar
src/java/org/mxchange/addressbook/beans/profile/UserProfileWebRequestBean.java
web/WEB-INF/templates/generic/user_profile_link.tpl
web/login/login_shared_addressbooks.xhtml
web/login/login_start_sharing_addressbook.xhtml
web/user/show_addressbook.xhtml
web/user/user_list.xhtml

index f42fc0bb6f804a7134b6959a34e8c210f76a3980..6b3619e1b879be6ab4b7b20ecf765dde842559b6 100644 (file)
Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ
index 0869a84bd7e91dd6ecb54cad62bde36cb583c0f7..24ff1a1b187cf69da8bbcab4f5d83a739b74b3f9 100644 (file)
@@ -60,7 +60,7 @@ public class UserProfileWebRequestBean implements UserProfileWebRequestControlle
 
        @Override
        public User getUser () {
-               return user;
+               return this.user;
        }
 
        @Override
index 379c763e8906efb52638fc4ab6f4d29e3126757a..c142209e97cdaa673fa06a105fa989af513c7e32 100644 (file)
@@ -6,9 +6,11 @@
        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>
index 358a591096731f2457dc90088b7aac23ca094fd7..e531374fde7a51db9bd333ec0dfec6ea49afd4f3 100644 (file)
@@ -4,7 +4,7 @@
          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>
@@ -21,6 +21,8 @@
 
                                <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>
 
@@ -32,9 +34,7 @@
 
                                                <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>
@@ -47,7 +47,7 @@
                                </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">
index 2f152fe19326d35594aeacc159761ca26679e9ad..50cc203ff8057dfbd1efa057dd55f8ea9502012a 100644 (file)
@@ -3,7 +3,8 @@
 <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>
@@ -23,7 +24,7 @@
                                        <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}" />
@@ -31,9 +32,7 @@
 
                                                <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>
index 9c980d8b3712bc1b55f28b18bd4309d2640e6053..7000aaedff5e97ac73edd7b280876525496c3acf 100644 (file)
@@ -3,7 +3,8 @@
 <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}">
@@ -22,6 +23,8 @@
 
                <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>
@@ -31,9 +34,7 @@
                                <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}">
index 8a08d31dbf629a4ad6fe0a8d10da985d640cc3f0..12f18f92afcecc8eee3656f0a08bd266dd9f6bef 100644 (file)
@@ -4,7 +4,7 @@
          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>