Jean-Francois Leveque

Compile (WIP sur updateUser.xhtml et le reste de la transition User)

...@@ -2,6 +2,7 @@ package org.legrog.application; ...@@ -2,6 +2,7 @@ package org.legrog.application;
2 2
3 import org.legrog.entities.Country; 3 import org.legrog.entities.Country;
4 import org.legrog.entities.DisplayNameMask; 4 import org.legrog.entities.DisplayNameMask;
5 +import org.legrog.entities.UserProperty;
5 import org.legrog.entities.UserRole; 6 import org.legrog.entities.UserRole;
6 7
7 import java.util.List; 8 import java.util.List;
...@@ -16,4 +17,6 @@ public interface SharedService { ...@@ -16,4 +17,6 @@ public interface SharedService {
16 17
17 List<UserRole> getAvailableUserRoles(); 18 List<UserRole> getAvailableUserRoles();
18 19
20 + List<UserProperty> getAvailableUserProperties();
21 +
19 } 22 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -16,6 +16,8 @@ public class SharedServiceSpring implements SharedService { ...@@ -16,6 +16,8 @@ public class SharedServiceSpring implements SharedService {
16 CountryRepository countryRepository; 16 CountryRepository countryRepository;
17 @Inject 17 @Inject
18 UserRoleRepository userRoleRepository; 18 UserRoleRepository userRoleRepository;
19 + @Inject
20 + UserPropertyRepository userPropertyRepository;
19 21
20 private List<DisplayNameMask> allDisplayNameMasks; 22 private List<DisplayNameMask> allDisplayNameMasks;
21 23
...@@ -43,4 +45,6 @@ public class SharedServiceSpring implements SharedService { ...@@ -43,4 +45,6 @@ public class SharedServiceSpring implements SharedService {
43 public List<UserRole> getAvailableUserRoles() { 45 public List<UserRole> getAvailableUserRoles() {
44 return userRoleRepository.findAll(); 46 return userRoleRepository.findAll();
45 } 47 }
48 +
49 + public List<UserProperty> getAvailableUserProperties() { return userPropertyRepository.findAll(); }
46 } 50 }
......
...@@ -425,7 +425,7 @@ public class User /* extends org.roliste.data.DbTraceableEntity */ implements Di ...@@ -425,7 +425,7 @@ public class User /* extends org.roliste.data.DbTraceableEntity */ implements Di
425 /** 425 /**
426 * The list of attributes / properties for this user. 426 * The list of attributes / properties for this user.
427 */ 427 */
428 -// private List<UserAttribute> _attrs; 428 + private List<UserAttribute> userAttributes;
429 429
430 /** 430 /**
431 * Retrieve this user's attributes. 431 * Retrieve this user's attributes.
...@@ -440,22 +440,22 @@ public class User /* extends org.roliste.data.DbTraceableEntity */ implements Di ...@@ -440,22 +440,22 @@ public class User /* extends org.roliste.data.DbTraceableEntity */ implements Di
440 * @return a {@link java.util.List} of user attributes linked to this. Shall not be <code>null</code>. 440 * @return a {@link java.util.List} of user attributes linked to this. Shall not be <code>null</code>.
441 * @see #setAttributes(java.util.List) 441 * @see #setAttributes(java.util.List)
442 */ 442 */
443 - /* 443 +
444 public List<UserAttribute> getAttributes() 444 public List<UserAttribute> getAttributes()
445 { 445 {
446 - return _attrs; 446 + return userAttributes;
447 } 447 }
448 -*/ 448 +
449 /** 449 /**
450 * @param attribs the List of attributes for this user. 450 * @param attribs the List of attributes for this user.
451 * @see #getAttributes() 451 * @see #getAttributes()
452 */ 452 */
453 - /* 453 +
454 public void setAttributes(List<UserAttribute> attribs) 454 public void setAttributes(List<UserAttribute> attribs)
455 { 455 {
456 - _attrs = attribs; 456 + this.userAttributes = attribs;
457 } 457 }
458 -*/ 458 +
459 /** 459 /**
460 * The {@link org.roliste.data.db.GamingEvent}s this user's visited. 460 * The {@link org.roliste.data.db.GamingEvent}s this user's visited.
461 */ 461 */
......
1 +package org.legrog.entities;
2 +
3 +import javax.persistence.*;
4 +
5 +@Entity
6 +public class UserAttribute {
7 + @Id
8 + @GeneratedValue(strategy = GenerationType.AUTO)
9 + private int userAttributeId;
10 +
11 + public int getUserAttributeId() {
12 + return userAttributeId;
13 + }
14 +
15 + /**
16 + * The linked user.
17 + */
18 + @ManyToOne
19 + private User user;
20 +
21 + /**
22 + * Retrieve the user this attribute is attached to.
23 + * @hibernate.many-to-one
24 + * column="ID_UTILISATEUR"
25 + * class="org.roliste.data.db.User"
26 + * not-null="true"
27 + * access="property"
28 + * lazy="proxy"
29 + * properties-name="PropertyPerUser"
30 + * foreign-key="FK_ATTRIBUTUTILISATEUR_UTILISATEUR"
31 + * @return the {link org.roliste.data.db.User} this attribute is attached to.
32 + * Shall not be <code>null</code>.
33 + * see #setUser(org.roliste.data.db.User)
34 + */
35 + public User getUser() {
36 + return user;
37 + }
38 +
39 + /**
40 + * Set the user this attribute is attached to.
41 + * @param user the new {link org.roliste.data.db.User} this attribute will be attached to. Shall not be <code>null</code>.
42 + * @see #getUser()
43 + */
44 + public void setUser(User user) {
45 + this.user = user;
46 + }
47 +
48 + /**
49 + * The linked property.
50 + */
51 + @ManyToOne
52 + private UserProperty userProperty;
53 +
54 + /**
55 + * Retrieve the property this attribute is attached to.
56 + * @hibernate.many-to-one
57 + * column="ID_PROP"
58 + * class="org.roliste.data.db.UserProperty"
59 + * not-null="true"
60 + * access="property"
61 + * lazy="false"
62 + * properties-name="PropertyPerUser"
63 + * foreign-key="FK_ATTRIBUTUTILISATEUR_PROPRIETE"
64 + * @return the {link org.roliste.data.db.UserProperty} this attribute is attached to.
65 + * Shall not be <code>null</code>.
66 + * see #setProperty(org.roliste.data.db.UserProperty)
67 + */
68 + public UserProperty getProperty() {
69 + return userProperty;
70 + }
71 +
72 + /**
73 + * Set the property this attribute is attached to.
74 + * @param prop the new {link org.roliste.data.db.UserProperty} this attribute will be attached to. Shall not be <code>null</code>.
75 + * @see #getProperty()
76 + */
77 + public void setProperty(UserProperty prop) {
78 + userProperty = prop;
79 + }
80 +
81 + /**
82 + * The property value.
83 + */
84 + private String value;
85 +
86 + /**
87 + * Returns the property value.
88 + * @return the {@link String} value. If property is known to be some other kind of value, you shall
89 + * convert it yourself. May be <code>null</code>, in cases where the sole existence of the attribute
90 + * is the value, or for unset attributes.
91 + * @see #setValue(String)
92 + * @hibernate.property
93 + * column="ATTR_VALUE"
94 + * access="property"
95 + * length="200"
96 + */
97 + public String getValue() {
98 + return value;
99 + }
100 +
101 + /**
102 + * Initializes attribute value.
103 + * @param value the new {@link String} value.
104 + * @see #getValue()
105 + */
106 + public void setValue(String value) {
107 + this.value = value;
108 + }
109 +
110 + /**
111 + * Returns a string representation of this user attribute definition.
112 + * @return a string representing this user attribute definition.
113 + * @hidden
114 + */
115 + public String toString()
116 + {
117 + StringBuilder sb = new StringBuilder();
118 +
119 + sb.append("ID_ATTR=");
120 + sb.append(getUserAttributeId());
121 +
122 + sb.append(" ATTR_PROP=");
123 + sb.append(userProperty);
124 +
125 + sb.append(" ATTR_VALUE=");
126 + sb.append(value);
127 +
128 + return sb.toString();
129 + }
130 +
131 +}
1 +package org.legrog.entities;
2 +
3 +import org.springframework.data.jpa.repository.JpaRepository;
4 +
5 +public interface UserAttributeRepository extends JpaRepository<UserAttribute, Integer> {
6 +}
1 +package org.legrog.entities;
2 +
3 +import javax.persistence.*;
4 +
5 +@Entity
6 +public class UserProperty {
7 + @Id
8 + @GeneratedValue(strategy = GenerationType.AUTO)
9 + private int userPropertyId;
10 +
11 + /**
12 + *
13 + * hibernate.id
14 + * generator-class="identity"
15 + * column="ID_PROP"
16 + * access="property"
17 + */
18 + public Integer getUserPropertyId() {
19 + return userPropertyId;
20 + }
21 +
22 + /**
23 + * The property name.
24 + */
25 + private String name;
26 +
27 + /**
28 + * Returns the property name.
29 + * @return the {@link String} attribute identifier.
30 + * @see #setName(String)
31 + * hibernate.property
32 + * column="ATTR_NAME"
33 + * not-null="true"
34 + * unique="true"
35 + * access="property"
36 + * length="50"
37 + */
38 + public String getName() {
39 + return name;
40 + }
41 +
42 + /**
43 + * Initializes the property name.
44 + * @param name the new {@link String} identifier.
45 + * @see #getName()
46 + */
47 + public void setName(String name) {
48 + this.name = name;
49 + }
50 +
51 + /**
52 + * The property tag.
53 + */
54 + private String tag;
55 +
56 + /**
57 + * Returns the property tag.
58 + * @return the {@link String} value.
59 + * @see #setTag(String)
60 + * hibernate.property
61 + * column="PROP_TAG"
62 + * access="property"
63 + * length="100"
64 + */
65 + public String getTag() {
66 + return tag;
67 + }
68 +
69 + /**
70 + * Initializes property tag.
71 + * @param tag the new {@link String} tag.
72 + * @see #getTag()
73 + */
74 + public void setTag(String tag) {
75 + this.tag = tag;
76 + }
77 +
78 + /**
79 + * The property validation status.
80 + * A property may be temporarily deactivated.
81 + */
82 + private boolean visible;
83 +
84 + /**
85 + * Indicates if the property is visible / usable.
86 + * If not, users should not be able to access the privileges
87 + * they inherit from having this property set.
88 + * @return the visible flag.
89 + * @see #setVisible(boolean)
90 + * hibernate.property
91 + * column="IND_VISIBLE"
92 + * access="property"
93 + */
94 + public boolean isVisible() {
95 + return visible;
96 + }
97 +
98 + /**
99 + * Initializes the property visible flag.
100 + * @param visible the new flag value.
101 + * @see #isVisible
102 + */
103 + public void setVisible(boolean visible) {
104 + this.visible = visible;
105 + }
106 +
107 + /**
108 + * Returns a string representation of this property definition.
109 + * @return a string representing this property definition.
110 + * hidden
111 + */
112 + public String toString()
113 + {
114 + StringBuilder sb = new StringBuilder();
115 +
116 + sb.append("ID_PROP=");
117 + sb.append(getUserPropertyId());
118 +
119 + sb.append(" PROP_NAME=");
120 + sb.append(name);
121 +
122 + sb.append(" PROP_TAG=");
123 + sb.append(tag);
124 +
125 + sb.append(" IND_VISIBLE=");
126 + sb.append(visible);
127 +
128 + return sb.toString();
129 + }
130 +
131 +}
...\ No newline at end of file ...\ No newline at end of file
1 +package org.legrog.entities;
2 +
3 +import org.springframework.data.jpa.repository.JpaRepository;
4 +
5 +public interface UserPropertyRepository extends JpaRepository<UserProperty, Integer> {
6 +}
...@@ -2,9 +2,7 @@ package org.legrog.presentation; ...@@ -2,9 +2,7 @@ package org.legrog.presentation;
2 2
3 import org.legrog.application.SharedService; 3 import org.legrog.application.SharedService;
4 import org.legrog.application.UserService; 4 import org.legrog.application.UserService;
5 -import org.legrog.entities.DisplayNameMask; 5 +import org.legrog.entities.*;
6 -import org.legrog.entities.User;
7 -import org.legrog.entities.UserRole;
8 6
9 import javax.annotation.PostConstruct; 7 import javax.annotation.PostConstruct;
10 import javax.enterprise.context.RequestScoped; 8 import javax.enterprise.context.RequestScoped;
...@@ -14,7 +12,7 @@ import java.util.List; ...@@ -14,7 +12,7 @@ import java.util.List;
14 12
15 @Named 13 @Named
16 @RequestScoped 14 @RequestScoped
17 -public class AddUserBean { 15 +public class UpdateUserBean {
18 @Inject 16 @Inject
19 private UserService userService; 17 private UserService userService;
20 @Inject 18 @Inject
...@@ -36,6 +34,8 @@ public class AddUserBean { ...@@ -36,6 +34,8 @@ public class AddUserBean {
36 34
37 private List<UserRole> availableUserRoles; 35 private List<UserRole> availableUserRoles;
38 36
37 + private List<UserProperty> availableUserProperties;
38 +
39 private String email; 39 private String email;
40 40
41 private boolean anonymous; 41 private boolean anonymous;
...@@ -46,6 +46,14 @@ public class AddUserBean { ...@@ -46,6 +46,14 @@ public class AddUserBean {
46 46
47 private String presentation; 47 private String presentation;
48 48
49 + private List<UserAttribute> userAttributes;
50 +
51 + private boolean criticProvider;
52 +
53 + private boolean visible;
54 +
55 + private boolean activated;
56 +
49 public String getUsername() { 57 public String getUsername() {
50 return username; 58 return username;
51 } 59 }
...@@ -146,6 +154,7 @@ public class AddUserBean { ...@@ -146,6 +154,7 @@ public class AddUserBean {
146 public void init() { 154 public void init() {
147 allDisplayNameMasks = sharedService.getAllDisplayNameMasks(); 155 allDisplayNameMasks = sharedService.getAllDisplayNameMasks();
148 availableUserRoles = sharedService.getAvailableUserRoles(); 156 availableUserRoles = sharedService.getAvailableUserRoles();
157 + availableUserProperties = sharedService.getAvailableUserProperties();
149 } 158 }
150 159
151 public List<UserRole> getAvailableUserRoles() { 160 public List<UserRole> getAvailableUserRoles() {
...@@ -163,4 +172,44 @@ public class AddUserBean { ...@@ -163,4 +172,44 @@ public class AddUserBean {
163 public void setPresentation(String presentation) { 172 public void setPresentation(String presentation) {
164 this.presentation = presentation; 173 this.presentation = presentation;
165 } 174 }
175 +
176 + public List<UserProperty> getAvailableUserProperties() {
177 + return availableUserProperties;
178 + }
179 +
180 + public void setAvailableUserProperties(List<UserProperty> availableUserProperties) {
181 + this.availableUserProperties = availableUserProperties;
182 + }
183 +
184 + public List<UserAttribute> getUserAttributes() {
185 + return userAttributes;
186 + }
187 +
188 + public void setUserAttributes(List<UserAttribute> userAttributes) {
189 + this.userAttributes = userAttributes;
190 + }
191 +
192 + public boolean isCriticProvider() {
193 + return criticProvider;
194 + }
195 +
196 + public void setCriticProvider(boolean criticProvider) {
197 + this.criticProvider = criticProvider;
198 + }
199 +
200 + public boolean isVisible() {
201 + return visible;
202 + }
203 +
204 + public void setVisible(boolean visible) {
205 + this.visible = visible;
206 + }
207 +
208 + public boolean isActivated() {
209 + return activated;
210 + }
211 +
212 + public void setActivated(boolean activated) {
213 + this.activated = activated;
214 + }
166 } 215 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
33 </navigation-case> 33 </navigation-case>
34 <navigation-case> 34 <navigation-case>
35 <from-outcome>addUser</from-outcome> 35 <from-outcome>addUser</from-outcome>
36 - <to-view-id>/addUser.xhtml</to-view-id> 36 + <to-view-id>/addUser_short.xhtml</to-view-id>
37 </navigation-case> 37 </navigation-case>
38 <navigation-case> 38 <navigation-case>
39 <from-outcome>listUsers</from-outcome> 39 <from-outcome>listUsers</from-outcome>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
50 </navigation-rule> 50 </navigation-rule>
51 51
52 <navigation-rule> 52 <navigation-rule>
53 - <from-view-id>/addUser.xhtml</from-view-id> 53 + <from-view-id>/addUser_short.xhtml</from-view-id>
54 <navigation-case> 54 <navigation-case>
55 <from-outcome>success</from-outcome> 55 <from-outcome>success</from-outcome>
56 <to-view-id>/listUsers_short.xhtml</to-view-id> 56 <to-view-id>/listUsers_short.xhtml</to-view-id>
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
13 13
14 <h:panelGrid columns="2"> 14 <h:panelGrid columns="2">
15 <h:outputText value="Username de l'utilisateur"/> 15 <h:outputText value="Username de l'utilisateur"/>
16 - <h:inputText value='#{addUserBean.username}'/> 16 + <h:inputText value='#{updateUserBean.username}'/>
17 <h:outputText value='Add'/> 17 <h:outputText value='Add'/>
18 - <h:commandButton action="#{addUserBean.add}" value="Add"/> 18 + <h:commandButton action="#{updateUserBean.add}" value="Add"/>
19 </h:panelGrid> 19 </h:panelGrid>
20 </h:form> 20 </h:form>
21 </body> 21 </body>
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
12 </h:commandLink> 12 </h:commandLink>
13 </h:form> 13 </h:form>
14 <f:metadata> 14 <f:metadata>
15 - <f:event type="preRenderView" listener="#{addUserBean.onload}" /> 15 + <f:event type="preRenderView" listener="#{updateUserBean.onload}" />
16 </f:metadata> 16 </f:metadata>
17 <ul> 17 <ul>
18 - <ui:repeat value="#{addUserBean.users}" var="user"> 18 + <ui:repeat value="#{updateUserBean.users}" var="user">
19 <li>#{user.username}</li> 19 <li>#{user.username}</li>
20 </ui:repeat> 20 </ui:repeat>
21 </ul> 21 </ul>
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
12 12
13 <!-- content --> 13 <!-- content -->
14 <ui:define name="content"> 14 <ui:define name="content">
15 - <h2><h:outputText value="Cration " rendered="#{empty(addUserBean.userId)}"/> 15 + <h2><h:outputText value="Cration " rendered="#{empty(updateUserBean.userId)}"/>
16 - <h:outputText value="Modification " rendered="#{not empty(addUserBean.userId)}"/>d'un utilisateur</h2> 16 + <h:outputText value="Modification " rendered="#{not empty(updateUserBean.userId)}"/>d'un utilisateur</h2>
17 17
18 <p> 18 <p>
19 Les rles sont hirarchiss, et la hirarchie est automatiquement applique lorsque vous 19 Les rles sont hirarchiss, et la hirarchie est automatiquement applique lorsque vous
...@@ -36,53 +36,53 @@ ...@@ -36,53 +36,53 @@
36 <table class="noMargin"> 36 <table class="noMargin">
37 <tr> 37 <tr>
38 <td><h:outputLabel for="username">Identifiant *</h:outputLabel></td> 38 <td><h:outputLabel for="username">Identifiant *</h:outputLabel></td>
39 - <td><h:inputText id="username" value="#{addUserBean.username}" required="true" style="width: 175px;" maxlength="50"/></td> 39 + <td><h:inputText id="username" value="#{updateUserBean.username}" required="true" style="width: 175px;" maxlength="50"/></td>
40 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="username"/></td> 40 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="username"/></td>
41 </tr> 41 </tr>
42 <tr> 42 <tr>
43 <td><h:outputLabel for="firstname">Prnom *</h:outputLabel></td> 43 <td><h:outputLabel for="firstname">Prnom *</h:outputLabel></td>
44 - <td><h:inputText id="firstname" value="#{addUserBean.firstName}" required="true" style="width: 175px;" maxlength="50"/></td> 44 + <td><h:inputText id="firstname" value="#{updateUserBean.firstName}" required="true" style="width: 175px;" maxlength="50"/></td>
45 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="firstname"/></td> 45 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="firstname"/></td>
46 </tr> 46 </tr>
47 <tr> 47 <tr>
48 <td><h:outputLabel for="lastname">Nom *</h:outputLabel></td> 48 <td><h:outputLabel for="lastname">Nom *</h:outputLabel></td>
49 - <td><h:inputText id="lastname" value="#{addUserBean.lastName}" required="true" style="width: 175px;" maxlength="50"/></td> 49 + <td><h:inputText id="lastname" value="#{updateUserBean.lastName}" required="true" style="width: 175px;" maxlength="50"/></td>
50 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="lastname"/></td> 50 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="lastname"/></td>
51 </tr> 51 </tr>
52 <tr> 52 <tr>
53 <td><h:outputLabel for="nickname">Pseudonyme</h:outputLabel></td> 53 <td><h:outputLabel for="nickname">Pseudonyme</h:outputLabel></td>
54 - <td><h:inputText id="nickname" value="#{addUserBean.nickName}" style="width: 175px;" maxlength="50"/></td> 54 + <td><h:inputText id="nickname" value="#{updateUserBean.nickName}" style="width: 175px;" maxlength="50"/></td>
55 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="nickname"/></td> 55 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="nickname"/></td>
56 </tr> 56 </tr>
57 <tr> 57 <tr>
58 <td><h:outputLabel for="mask">Affichage public du nom *</h:outputLabel></td> 58 <td><h:outputLabel for="mask">Affichage public du nom *</h:outputLabel></td>
59 <td> 59 <td>
60 - <h:selectOneMenu id="mask" value="#{addUserBean.displayNameMask}" converter="omnifaces.SelectItemsConverter" required="true" style="width: 175px;"> 60 + <h:selectOneMenu id="mask" value="#{updateUserBean.displayNameMask}" converter="omnifaces.SelectItemsConverter" required="true" style="width: 175px;">
61 - <f:selectItems value="#{addUserBean.allDisplayNameMasks}"/> 61 + <f:selectItems value="#{updateUserBean.allDisplayNameMasks}"/>
62 </h:selectOneMenu> 62 </h:selectOneMenu>
63 </td> 63 </td>
64 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="mask"/></td> 64 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="mask"/></td>
65 </tr> 65 </tr>
66 <tr> 66 <tr>
67 <td><h:outputLabel for="email">Adresse email *</h:outputLabel></td> 67 <td><h:outputLabel for="email">Adresse email *</h:outputLabel></td>
68 - <td><h:inputText id="email" value="#{addUserBean.email}" required="true" style="width: 175px;" maxlength="100"><f:validator validatorId="validateEmail"/></h:inputText></td> 68 + <td><h:inputText id="email" value="#{updateUserBean.email}" required="true" style="width: 175px;" maxlength="100"><f:validator validatorId="validateEmail"/></h:inputText></td>
69 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="email"/></td> 69 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="email"/></td>
70 </tr> 70 </tr>
71 <tr> 71 <tr>
72 <td><h:outputLabel for="anonymous">Profil Anonyme ?</h:outputLabel></td> 72 <td><h:outputLabel for="anonymous">Profil Anonyme ?</h:outputLabel></td>
73 - <td><h:selectBooleanCheckbox id="anonymous" value="#{addUserBean.anonymous}"/></td> 73 + <td><h:selectBooleanCheckbox id="anonymous" value="#{updateUserBean.anonymous}"/></td>
74 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="anonymous"/></td> 74 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="anonymous"/></td>
75 </tr> 75 </tr>
76 <tr> 76 <tr>
77 <td><h:outputLabel for="password">Mot de passe *</h:outputLabel></td> 77 <td><h:outputLabel for="password">Mot de passe *</h:outputLabel></td>
78 - <td><h:inputSecret id="password" redisplay="true" value="#{addUserBean.password}" required="true" style="width: 175px;" maxlength="50"/></td> 78 + <td><h:inputSecret id="password" redisplay="true" value="#{updateUserBean.password}" required="true" style="width: 175px;" maxlength="50"/></td>
79 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="password"/></td> 79 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="password"/></td>
80 </tr> 80 </tr>
81 <tr> 81 <tr>
82 <td><h:outputLabel for="roles">Rles</h:outputLabel></td> 82 <td><h:outputLabel for="roles">Rles</h:outputLabel></td>
83 <td> 83 <td>
84 - <h:selectManyCheckbox id="roles" value="#{addUserBean.roles}" converter="omnifaces.SelectItemsConverter" layout="pageDirection" > 84 + <h:selectManyCheckbox id="roles" value="#{updateUserBean.roles}" converter="omnifaces.SelectItemsConverter" layout="pageDirection" >
85 - <f:selectItems value="#{addUserBean.availableUserRoles}" var="role" label="#{role.rolename}" /> 85 + <f:selectItems value="#{updateUserBean.availableUserRoles}" var="role" label="#{role.rolename}" />
86 </h:selectManyCheckbox> 86 </h:selectManyCheckbox>
87 </td> 87 </td>
88 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="roles"/></td> 88 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="roles"/></td>
...@@ -92,19 +92,19 @@ ...@@ -92,19 +92,19 @@
92 <h:outputLabel for="text">Texte de prsentation</h:outputLabel><br/> 92 <h:outputLabel for="text">Texte de prsentation</h:outputLabel><br/>
93 <h:message styleClass="errorMsg" for="text"/> 93 <h:message styleClass="errorMsg" for="text"/>
94 </td> 94 </td>
95 - <td colspan="2"><rich:editor id="text" value="#{addUserBean.presentation}" configuration="article-editor"/></td> 95 + <td colspan="2"><rich:editor id="text" value="#{updateUserBean.presentation}" configuration="article-editor"/></td>
96 </tr> 96 </tr>
97 - <ui:fragment rendered="#{not empty(addUserBean.userId)}"> 97 + <ui:fragment rendered="#{not empty(updateUserBean.userId)}">
98 <tr> 98 <tr>
99 <td colspan="3" class="taCenter"> 99 <td colspan="3" class="taCenter">
100 <h:dataTable style="width:75%" headerClass="colDroite" 100 <h:dataTable style="width:75%" headerClass="colDroite"
101 - var="userProperty" value="#{common.availableUserProperties}"> 101 + var="userProperty" value="#{updateUserBean.availableUserProperties}">
102 <h:column> 102 <h:column>
103 <f:facet name="header"><h:outputLabel>Proprits</h:outputLabel></f:facet> 103 <f:facet name="header"><h:outputLabel>Proprits</h:outputLabel></f:facet>
104 <h:outputText value="#{userProperty.tag}"/> 104 <h:outputText value="#{userProperty.tag}"/>
105 </h:column> 105 </h:column>
106 <h:column> 106 <h:column>
107 - <h:inputText id="prop_#{userProperty.name}" value="#{userMgr.userAttributes[userProperty.name].value}" style="width: 175px;"> 107 + <h:inputText id="prop_#{userProperty.name}" value="#{updateUserBean.userAttributes[userProperty.name].value}" style="width: 175px;">
108 <f:validateLength maximum="200"/> 108 <f:validateLength maximum="200"/>
109 </h:inputText> 109 </h:inputText>
110 </h:column> 110 </h:column>
...@@ -114,22 +114,22 @@ ...@@ -114,22 +114,22 @@
114 </ui:fragment> 114 </ui:fragment>
115 <tr> 115 <tr>
116 <td><h:outputLabel for="criticProvider">Archives de critiques ?</h:outputLabel></td> 116 <td><h:outputLabel for="criticProvider">Archives de critiques ?</h:outputLabel></td>
117 - <td><h:selectBooleanCheckbox id="criticProvider" value="#{addUserBean.criticProvider}"/></td> 117 + <td><h:selectBooleanCheckbox id="criticProvider" value="#{updateUserBean.criticProvider}"/></td>
118 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="criticProvider"/></td> 118 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="criticProvider"/></td>
119 </tr> 119 </tr>
120 <tr> 120 <tr>
121 <td><h:outputLabel for="visible">Visible ?</h:outputLabel></td> 121 <td><h:outputLabel for="visible">Visible ?</h:outputLabel></td>
122 - <td><h:selectBooleanCheckbox id="visible" value="#{addUserBean.visible}"/></td> 122 + <td><h:selectBooleanCheckbox id="visible" value="#{updateUserBean.visible}"/></td>
123 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="visible"/></td> 123 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="visible"/></td>
124 </tr> 124 </tr>
125 <tr> 125 <tr>
126 <td><h:outputLabel for="activated">Activ ?</h:outputLabel></td> 126 <td><h:outputLabel for="activated">Activ ?</h:outputLabel></td>
127 - <td><h:selectBooleanCheckbox id="activated" value="#{addUserBean.activated}"/></td> 127 + <td><h:selectBooleanCheckbox id="activated" value="#{updateUserBean.activated}"/></td>
128 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="activated"/></td> 128 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="activated"/></td>
129 </tr> 129 </tr>
130 <tr> 130 <tr>
131 <td colspan="3" class="taCenter"> 131 <td colspan="3" class="taCenter">
132 - <h:commandButton id="update" value="Enregistrer" action="#{userMgr.save}"/>&#160; 132 + <h:commandButton id="update" value="Enregistrer" action="#{updateUserBean.update}"/>&#160;
133 <h:commandButton id="cancel" value="Annuler" action="#{userMgr.cancel}" immediate="true"> 133 <h:commandButton id="cancel" value="Annuler" action="#{userMgr.cancel}" immediate="true">
134 </h:commandButton> 134 </h:commandButton>
135 </td> 135 </td>
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
140 </p:panel> 140 </p:panel>
141 141
142 <p:panel headerClass="colDroite" bodyClass="colTexte" label="Import d'anciennes donnes" 142 <p:panel headerClass="colDroite" bodyClass="colTexte" label="Import d'anciennes donnes"
143 - switchType="ajax" opened="true" rendered="#{not empty(addUserBean.userId)}"> 143 + switchType="ajax" opened="true" rendered="#{not empty(updateUserBean.userId)}">
144 <h:form> 144 <h:form>
145 <!-- <s:validateAll>--> 145 <!-- <s:validateAll>-->
146 <p> 146 <p>
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
179 </h:form> 179 </h:form>
180 </p:panel> 180 </p:panel>
181 181
182 - <h:form rendered="#{not empty(addUserBean.userId)}"> 182 + <h:form rendered="#{not empty(updateUserBean.userId)}">
183 <h3>Dlgations</h3> 183 <h3>Dlgations</h3>
184 <p> 184 <p>
185 Les sections suivantes rpertorient les diffrents lments pour lesquels l'utilisateur 185 Les sections suivantes rpertorient les diffrents lments pour lesquels l'utilisateur
......