Toggle navigation
Toggle navigation
This project
Loading...
Sign in
grogv3
/
grog-cubi
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jean-Francois Leveque
2016-10-05 17:08:22 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
08a0358f9b2e315f6f34a268789da1c9ce33856f
08a0358f
1 parent
6448b26d
Compile (WIP sur updateUser.xhtml et le reste de la transition User)
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
370 additions
and
40 deletions
src/main/java/org/legrog/application/SharedService.java
src/main/java/org/legrog/application/SharedServiceSpring.java
src/main/java/org/legrog/entities/User.java
src/main/java/org/legrog/entities/UserAttribute.java
src/main/java/org/legrog/entities/UserAttributeRepository.java
src/main/java/org/legrog/entities/UserProperty.java
src/main/java/org/legrog/entities/UserPropertyRepository.java
src/main/java/org/legrog/presentation/AddUserBean.java → src/main/java/org/legrog/presentation/UpdateUserBean.java
src/main/webapp/WEB-INF/faces-config.xml
src/main/webapp/addUser.xhtml → src/main/webapp/addUser_short.xhtml
src/main/webapp/listUsers_short.xhtml
src/main/webapp/updateUser.xhtml
src/main/java/org/legrog/application/SharedService.java
View file @
08a0358
...
...
@@ -2,6 +2,7 @@ package org.legrog.application;
import
org.legrog.entities.Country
;
import
org.legrog.entities.DisplayNameMask
;
import
org.legrog.entities.UserProperty
;
import
org.legrog.entities.UserRole
;
import
java.util.List
;
...
...
@@ -16,4 +17,6 @@ public interface SharedService {
List
<
UserRole
>
getAvailableUserRoles
();
List
<
UserProperty
>
getAvailableUserProperties
();
}
\ No newline at end of file
...
...
src/main/java/org/legrog/application/SharedServiceSpring.java
View file @
08a0358
...
...
@@ -16,6 +16,8 @@ public class SharedServiceSpring implements SharedService {
CountryRepository
countryRepository
;
@Inject
UserRoleRepository
userRoleRepository
;
@Inject
UserPropertyRepository
userPropertyRepository
;
private
List
<
DisplayNameMask
>
allDisplayNameMasks
;
...
...
@@ -43,4 +45,6 @@ public class SharedServiceSpring implements SharedService {
public
List
<
UserRole
>
getAvailableUserRoles
()
{
return
userRoleRepository
.
findAll
();
}
public
List
<
UserProperty
>
getAvailableUserProperties
()
{
return
userPropertyRepository
.
findAll
();
}
}
...
...
src/main/java/org/legrog/entities/User.java
View file @
08a0358
...
...
@@ -425,7 +425,7 @@ public class User /* extends org.roliste.data.DbTraceableEntity */ implements Di
/**
* The list of attributes / properties for this user.
*/
// private List<UserAttribute> _attr
s;
private
List
<
UserAttribute
>
userAttribute
s
;
/**
* Retrieve this user's attributes.
...
...
@@ -440,22 +440,22 @@ public class User /* extends org.roliste.data.DbTraceableEntity */ implements Di
* @return a {@link java.util.List} of user attributes linked to this. Shall not be <code>null</code>.
* @see #setAttributes(java.util.List)
*/
/*
public
List
<
UserAttribute
>
getAttributes
()
{
return
_attr
s;
return
userAttribute
s
;
}
*/
/**
* @param attribs the List of attributes for this user.
* @see #getAttributes()
*/
/*
public
void
setAttributes
(
List
<
UserAttribute
>
attribs
)
{
_attr
s = attribs;
this
.
userAttribute
s
=
attribs
;
}
*/
/**
* The {@link org.roliste.data.db.GamingEvent}s this user's visited.
*/
...
...
src/main/java/org/legrog/entities/UserAttribute.java
0 → 100644
View file @
08a0358
package
org
.
legrog
.
entities
;
import
javax.persistence.*
;
@Entity
public
class
UserAttribute
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
private
int
userAttributeId
;
public
int
getUserAttributeId
()
{
return
userAttributeId
;
}
/**
* The linked user.
*/
@ManyToOne
private
User
user
;
/**
* Retrieve the user this attribute is attached to.
* @hibernate.many-to-one
* column="ID_UTILISATEUR"
* class="org.roliste.data.db.User"
* not-null="true"
* access="property"
* lazy="proxy"
* properties-name="PropertyPerUser"
* foreign-key="FK_ATTRIBUTUTILISATEUR_UTILISATEUR"
* @return the {link org.roliste.data.db.User} this attribute is attached to.
* Shall not be <code>null</code>.
* see #setUser(org.roliste.data.db.User)
*/
public
User
getUser
()
{
return
user
;
}
/**
* Set the user this attribute is attached to.
* @param user the new {link org.roliste.data.db.User} this attribute will be attached to. Shall not be <code>null</code>.
* @see #getUser()
*/
public
void
setUser
(
User
user
)
{
this
.
user
=
user
;
}
/**
* The linked property.
*/
@ManyToOne
private
UserProperty
userProperty
;
/**
* Retrieve the property this attribute is attached to.
* @hibernate.many-to-one
* column="ID_PROP"
* class="org.roliste.data.db.UserProperty"
* not-null="true"
* access="property"
* lazy="false"
* properties-name="PropertyPerUser"
* foreign-key="FK_ATTRIBUTUTILISATEUR_PROPRIETE"
* @return the {link org.roliste.data.db.UserProperty} this attribute is attached to.
* Shall not be <code>null</code>.
* see #setProperty(org.roliste.data.db.UserProperty)
*/
public
UserProperty
getProperty
()
{
return
userProperty
;
}
/**
* Set the property this attribute is attached to.
* @param prop the new {link org.roliste.data.db.UserProperty} this attribute will be attached to. Shall not be <code>null</code>.
* @see #getProperty()
*/
public
void
setProperty
(
UserProperty
prop
)
{
userProperty
=
prop
;
}
/**
* The property value.
*/
private
String
value
;
/**
* Returns the property value.
* @return the {@link String} value. If property is known to be some other kind of value, you shall
* convert it yourself. May be <code>null</code>, in cases where the sole existence of the attribute
* is the value, or for unset attributes.
* @see #setValue(String)
* @hibernate.property
* column="ATTR_VALUE"
* access="property"
* length="200"
*/
public
String
getValue
()
{
return
value
;
}
/**
* Initializes attribute value.
* @param value the new {@link String} value.
* @see #getValue()
*/
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
/**
* Returns a string representation of this user attribute definition.
* @return a string representing this user attribute definition.
* @hidden
*/
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"ID_ATTR="
);
sb
.
append
(
getUserAttributeId
());
sb
.
append
(
" ATTR_PROP="
);
sb
.
append
(
userProperty
);
sb
.
append
(
" ATTR_VALUE="
);
sb
.
append
(
value
);
return
sb
.
toString
();
}
}
src/main/java/org/legrog/entities/UserAttributeRepository.java
0 → 100644
View file @
08a0358
package
org
.
legrog
.
entities
;
import
org.springframework.data.jpa.repository.JpaRepository
;
public
interface
UserAttributeRepository
extends
JpaRepository
<
UserAttribute
,
Integer
>
{
}
src/main/java/org/legrog/entities/UserProperty.java
0 → 100644
View file @
08a0358
package
org
.
legrog
.
entities
;
import
javax.persistence.*
;
@Entity
public
class
UserProperty
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
private
int
userPropertyId
;
/**
*
* hibernate.id
* generator-class="identity"
* column="ID_PROP"
* access="property"
*/
public
Integer
getUserPropertyId
()
{
return
userPropertyId
;
}
/**
* The property name.
*/
private
String
name
;
/**
* Returns the property name.
* @return the {@link String} attribute identifier.
* @see #setName(String)
* hibernate.property
* column="ATTR_NAME"
* not-null="true"
* unique="true"
* access="property"
* length="50"
*/
public
String
getName
()
{
return
name
;
}
/**
* Initializes the property name.
* @param name the new {@link String} identifier.
* @see #getName()
*/
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
/**
* The property tag.
*/
private
String
tag
;
/**
* Returns the property tag.
* @return the {@link String} value.
* @see #setTag(String)
* hibernate.property
* column="PROP_TAG"
* access="property"
* length="100"
*/
public
String
getTag
()
{
return
tag
;
}
/**
* Initializes property tag.
* @param tag the new {@link String} tag.
* @see #getTag()
*/
public
void
setTag
(
String
tag
)
{
this
.
tag
=
tag
;
}
/**
* The property validation status.
* A property may be temporarily deactivated.
*/
private
boolean
visible
;
/**
* Indicates if the property is visible / usable.
* If not, users should not be able to access the privileges
* they inherit from having this property set.
* @return the visible flag.
* @see #setVisible(boolean)
* hibernate.property
* column="IND_VISIBLE"
* access="property"
*/
public
boolean
isVisible
()
{
return
visible
;
}
/**
* Initializes the property visible flag.
* @param visible the new flag value.
* @see #isVisible
*/
public
void
setVisible
(
boolean
visible
)
{
this
.
visible
=
visible
;
}
/**
* Returns a string representation of this property definition.
* @return a string representing this property definition.
* hidden
*/
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"ID_PROP="
);
sb
.
append
(
getUserPropertyId
());
sb
.
append
(
" PROP_NAME="
);
sb
.
append
(
name
);
sb
.
append
(
" PROP_TAG="
);
sb
.
append
(
tag
);
sb
.
append
(
" IND_VISIBLE="
);
sb
.
append
(
visible
);
return
sb
.
toString
();
}
}
\ No newline at end of file
src/main/java/org/legrog/entities/UserPropertyRepository.java
0 → 100644
View file @
08a0358
package
org
.
legrog
.
entities
;
import
org.springframework.data.jpa.repository.JpaRepository
;
public
interface
UserPropertyRepository
extends
JpaRepository
<
UserProperty
,
Integer
>
{
}
src/main/java/org/legrog/presentation/
Add
UserBean.java
→
src/main/java/org/legrog/presentation/
Update
UserBean.java
View file @
08a0358
...
...
@@ -2,9 +2,7 @@ package org.legrog.presentation;
import
org.legrog.application.SharedService
;
import
org.legrog.application.UserService
;
import
org.legrog.entities.DisplayNameMask
;
import
org.legrog.entities.User
;
import
org.legrog.entities.UserRole
;
import
org.legrog.entities.*
;
import
javax.annotation.PostConstruct
;
import
javax.enterprise.context.RequestScoped
;
...
...
@@ -14,7 +12,7 @@ import java.util.List;
@Named
@RequestScoped
public
class
Add
UserBean
{
public
class
Update
UserBean
{
@Inject
private
UserService
userService
;
@Inject
...
...
@@ -36,6 +34,8 @@ public class AddUserBean {
private
List
<
UserRole
>
availableUserRoles
;
private
List
<
UserProperty
>
availableUserProperties
;
private
String
email
;
private
boolean
anonymous
;
...
...
@@ -46,6 +46,14 @@ public class AddUserBean {
private
String
presentation
;
private
List
<
UserAttribute
>
userAttributes
;
private
boolean
criticProvider
;
private
boolean
visible
;
private
boolean
activated
;
public
String
getUsername
()
{
return
username
;
}
...
...
@@ -146,6 +154,7 @@ public class AddUserBean {
public
void
init
()
{
allDisplayNameMasks
=
sharedService
.
getAllDisplayNameMasks
();
availableUserRoles
=
sharedService
.
getAvailableUserRoles
();
availableUserProperties
=
sharedService
.
getAvailableUserProperties
();
}
public
List
<
UserRole
>
getAvailableUserRoles
()
{
...
...
@@ -163,4 +172,44 @@ public class AddUserBean {
public
void
setPresentation
(
String
presentation
)
{
this
.
presentation
=
presentation
;
}
public
List
<
UserProperty
>
getAvailableUserProperties
()
{
return
availableUserProperties
;
}
public
void
setAvailableUserProperties
(
List
<
UserProperty
>
availableUserProperties
)
{
this
.
availableUserProperties
=
availableUserProperties
;
}
public
List
<
UserAttribute
>
getUserAttributes
()
{
return
userAttributes
;
}
public
void
setUserAttributes
(
List
<
UserAttribute
>
userAttributes
)
{
this
.
userAttributes
=
userAttributes
;
}
public
boolean
isCriticProvider
()
{
return
criticProvider
;
}
public
void
setCriticProvider
(
boolean
criticProvider
)
{
this
.
criticProvider
=
criticProvider
;
}
public
boolean
isVisible
()
{
return
visible
;
}
public
void
setVisible
(
boolean
visible
)
{
this
.
visible
=
visible
;
}
public
boolean
isActivated
()
{
return
activated
;
}
public
void
setActivated
(
boolean
activated
)
{
this
.
activated
=
activated
;
}
}
\ No newline at end of file
...
...
src/main/webapp/WEB-INF/faces-config.xml
View file @
08a0358
...
...
@@ -33,7 +33,7 @@
</navigation-case>
<navigation-case>
<from-outcome>
addUser
</from-outcome>
<to-view-id>
/addUser.xhtml
</to-view-id>
<to-view-id>
/addUser
_short
.xhtml
</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>
listUsers
</from-outcome>
...
...
@@ -50,7 +50,7 @@
</navigation-rule>
<navigation-rule>
<from-view-id>
/addUser.xhtml
</from-view-id>
<from-view-id>
/addUser
_short
.xhtml
</from-view-id>
<navigation-case>
<from-outcome>
success
</from-outcome>
<to-view-id>
/listUsers_short.xhtml
</to-view-id>
...
...
src/main/webapp/addUser.xhtml
→
src/main/webapp/addUser
_short
.xhtml
View file @
08a0358
...
...
@@ -13,9 +13,9 @@
<h:panelGrid
columns=
"2"
>
<h:outputText
value=
"Username de l'utilisateur"
/>
<h:inputText
value=
'#{
add
UserBean.username}'
/>
<h:inputText
value=
'#{
update
UserBean.username}'
/>
<h:outputText
value=
'Add'
/>
<h:commandButton
action=
"#{
add
UserBean.add}"
value=
"Add"
/>
<h:commandButton
action=
"#{
update
UserBean.add}"
value=
"Add"
/>
</h:panelGrid>
</h:form>
</body>
...
...
src/main/webapp/listUsers_short.xhtml
View file @
08a0358
...
...
@@ -12,10 +12,10 @@
</h:commandLink>
</h:form>
<f:metadata>
<f:event
type=
"preRenderView"
listener=
"#{
add
UserBean.onload}"
/>
<f:event
type=
"preRenderView"
listener=
"#{
update
UserBean.onload}"
/>
</f:metadata>
<ul>
<ui:repeat
value=
"#{
add
UserBean.users}"
var=
"user"
>
<ui:repeat
value=
"#{
update
UserBean.users}"
var=
"user"
>
<li>
#{user.username}
</li>
</ui:repeat>
</ul>
...
...
src/main/webapp/updateUser.xhtml
View file @
08a0358
...
...
@@ -12,8 +12,8 @@
<!-- content -->
<ui:define
name=
"content"
>
<h2><h:outputText
value=
"Cration "
rendered=
"#{empty(
add
UserBean.userId)}"
/>
<h:outputText
value=
"Modification "
rendered=
"#{not empty(
add
UserBean.userId)}"
/>
d'un utilisateur
</h2>
<h2><h:outputText
value=
"Cration "
rendered=
"#{empty(
update
UserBean.userId)}"
/>
<h:outputText
value=
"Modification "
rendered=
"#{not empty(
update
UserBean.userId)}"
/>
d'un utilisateur
</h2>
<p>
Les rles sont hirarchiss, et la hirarchie est automatiquement applique lorsque vous
...
...
@@ -36,53 +36,53 @@
<table
class=
"noMargin"
>
<tr>
<td><h:outputLabel
for=
"username"
>
Identifiant *
</h:outputLabel></td>
<td><h:inputText
id=
"username"
value=
"#{
add
UserBean.username}"
required=
"true"
style=
"width: 175px;"
maxlength=
"50"
/></td>
<td><h:inputText
id=
"username"
value=
"#{
update
UserBean.username}"
required=
"true"
style=
"width: 175px;"
maxlength=
"50"
/></td>
<td><h:message
errorClass=
"errorMsg"
infoClass=
"infoMsg"
for=
"username"
/></td>
</tr>
<tr>
<td><h:outputLabel
for=
"firstname"
>
Prnom *
</h:outputLabel></td>
<td><h:inputText
id=
"firstname"
value=
"#{
add
UserBean.firstName}"
required=
"true"
style=
"width: 175px;"
maxlength=
"50"
/></td>
<td><h:inputText
id=
"firstname"
value=
"#{
update
UserBean.firstName}"
required=
"true"
style=
"width: 175px;"
maxlength=
"50"
/></td>
<td><h:message
errorClass=
"errorMsg"
infoClass=
"infoMsg"
for=
"firstname"
/></td>
</tr>
<tr>
<td><h:outputLabel
for=
"lastname"
>
Nom *
</h:outputLabel></td>
<td><h:inputText
id=
"lastname"
value=
"#{
add
UserBean.lastName}"
required=
"true"
style=
"width: 175px;"
maxlength=
"50"
/></td>
<td><h:inputText
id=
"lastname"
value=
"#{
update
UserBean.lastName}"
required=
"true"
style=
"width: 175px;"
maxlength=
"50"
/></td>
<td><h:message
errorClass=
"errorMsg"
infoClass=
"infoMsg"
for=
"lastname"
/></td>
</tr>
<tr>
<td><h:outputLabel
for=
"nickname"
>
Pseudonyme
</h:outputLabel></td>
<td><h:inputText
id=
"nickname"
value=
"#{
add
UserBean.nickName}"
style=
"width: 175px;"
maxlength=
"50"
/></td>
<td><h:inputText
id=
"nickname"
value=
"#{
update
UserBean.nickName}"
style=
"width: 175px;"
maxlength=
"50"
/></td>
<td><h:message
errorClass=
"errorMsg"
infoClass=
"infoMsg"
for=
"nickname"
/></td>
</tr>
<tr>
<td><h:outputLabel
for=
"mask"
>
Affichage public du nom *
</h:outputLabel></td>
<td>
<h:selectOneMenu
id=
"mask"
value=
"#{
add
UserBean.displayNameMask}"
converter=
"omnifaces.SelectItemsConverter"
required=
"true"
style=
"width: 175px;"
>
<f:selectItems
value=
"#{
add
UserBean.allDisplayNameMasks}"
/>
<h:selectOneMenu
id=
"mask"
value=
"#{
update
UserBean.displayNameMask}"
converter=
"omnifaces.SelectItemsConverter"
required=
"true"
style=
"width: 175px;"
>
<f:selectItems
value=
"#{
update
UserBean.allDisplayNameMasks}"
/>
</h:selectOneMenu>
</td>
<td><h:message
errorClass=
"errorMsg"
infoClass=
"infoMsg"
for=
"mask"
/></td>
</tr>
<tr>
<td><h:outputLabel
for=
"email"
>
Adresse email *
</h:outputLabel></td>
<td><h:inputText
id=
"email"
value=
"#{
add
UserBean.email}"
required=
"true"
style=
"width: 175px;"
maxlength=
"100"
><f:validator
validatorId=
"validateEmail"
/></h:inputText></td>
<td><h:inputText
id=
"email"
value=
"#{
update
UserBean.email}"
required=
"true"
style=
"width: 175px;"
maxlength=
"100"
><f:validator
validatorId=
"validateEmail"
/></h:inputText></td>
<td><h:message
errorClass=
"errorMsg"
infoClass=
"infoMsg"
for=
"email"
/></td>
</tr>
<tr>
<td><h:outputLabel
for=
"anonymous"
>
Profil Anonyme ?
</h:outputLabel></td>
<td><h:selectBooleanCheckbox
id=
"anonymous"
value=
"#{
add
UserBean.anonymous}"
/></td>
<td><h:selectBooleanCheckbox
id=
"anonymous"
value=
"#{
update
UserBean.anonymous}"
/></td>
<td><h:message
errorClass=
"errorMsg"
infoClass=
"infoMsg"
for=
"anonymous"
/></td>
</tr>
<tr>
<td><h:outputLabel
for=
"password"
>
Mot de passe *
</h:outputLabel></td>
<td><h:inputSecret
id=
"password"
redisplay=
"true"
value=
"#{
add
UserBean.password}"
required=
"true"
style=
"width: 175px;"
maxlength=
"50"
/></td>
<td><h:inputSecret
id=
"password"
redisplay=
"true"
value=
"#{
update
UserBean.password}"
required=
"true"
style=
"width: 175px;"
maxlength=
"50"
/></td>
<td><h:message
errorClass=
"errorMsg"
infoClass=
"infoMsg"
for=
"password"
/></td>
</tr>
<tr>
<td><h:outputLabel
for=
"roles"
>
Rles
</h:outputLabel></td>
<td>
<h:selectManyCheckbox
id=
"roles"
value=
"#{
add
UserBean.roles}"
converter=
"omnifaces.SelectItemsConverter"
layout=
"pageDirection"
>
<f:selectItems
value=
"#{
add
UserBean.availableUserRoles}"
var=
"role"
label=
"#{role.rolename}"
/>
<h:selectManyCheckbox
id=
"roles"
value=
"#{
update
UserBean.roles}"
converter=
"omnifaces.SelectItemsConverter"
layout=
"pageDirection"
>
<f:selectItems
value=
"#{
update
UserBean.availableUserRoles}"
var=
"role"
label=
"#{role.rolename}"
/>
</h:selectManyCheckbox>
</td>
<td><h:message
errorClass=
"errorMsg"
infoClass=
"infoMsg"
for=
"roles"
/></td>
...
...
@@ -92,19 +92,19 @@
<h:outputLabel
for=
"text"
>
Texte de prsentation
</h:outputLabel><br/>
<h:message
styleClass=
"errorMsg"
for=
"text"
/>
</td>
<td
colspan=
"2"
><rich:editor
id=
"text"
value=
"#{
add
UserBean.presentation}"
configuration=
"article-editor"
/></td>
<td
colspan=
"2"
><rich:editor
id=
"text"
value=
"#{
update
UserBean.presentation}"
configuration=
"article-editor"
/></td>
</tr>
<ui:fragment
rendered=
"#{not empty(
add
UserBean.userId)}"
>
<ui:fragment
rendered=
"#{not empty(
update
UserBean.userId)}"
>
<tr>
<td
colspan=
"3"
class=
"taCenter"
>
<h:dataTable
style=
"width:75%"
headerClass=
"colDroite"
var=
"userProperty"
value=
"#{
commo
n.availableUserProperties}"
>
var=
"userProperty"
value=
"#{
updateUserBea
n.availableUserProperties}"
>
<h:column>
<f:facet
name=
"header"
><h:outputLabel>
Proprits
</h:outputLabel></f:facet>
<h:outputText
value=
"#{userProperty.tag}"
/>
</h:column>
<h:column>
<h:inputText
id=
"prop_#{userProperty.name}"
value=
"#{u
serMgr
.userAttributes[userProperty.name].value}"
style=
"width: 175px;"
>
<h:inputText
id=
"prop_#{userProperty.name}"
value=
"#{u
pdateUserBean
.userAttributes[userProperty.name].value}"
style=
"width: 175px;"
>
<f:validateLength
maximum=
"200"
/>
</h:inputText>
</h:column>
...
...
@@ -114,22 +114,22 @@
</ui:fragment>
<tr>
<td><h:outputLabel
for=
"criticProvider"
>
Archives de critiques ?
</h:outputLabel></td>
<td><h:selectBooleanCheckbox
id=
"criticProvider"
value=
"#{
add
UserBean.criticProvider}"
/></td>
<td><h:selectBooleanCheckbox
id=
"criticProvider"
value=
"#{
update
UserBean.criticProvider}"
/></td>
<td><h:message
errorClass=
"errorMsg"
infoClass=
"infoMsg"
for=
"criticProvider"
/></td>
</tr>
<tr>
<td><h:outputLabel
for=
"visible"
>
Visible ?
</h:outputLabel></td>
<td><h:selectBooleanCheckbox
id=
"visible"
value=
"#{
add
UserBean.visible}"
/></td>
<td><h:selectBooleanCheckbox
id=
"visible"
value=
"#{
update
UserBean.visible}"
/></td>
<td><h:message
errorClass=
"errorMsg"
infoClass=
"infoMsg"
for=
"visible"
/></td>
</tr>
<tr>
<td><h:outputLabel
for=
"activated"
>
Activ ?
</h:outputLabel></td>
<td><h:selectBooleanCheckbox
id=
"activated"
value=
"#{
add
UserBean.activated}"
/></td>
<td><h:selectBooleanCheckbox
id=
"activated"
value=
"#{
update
UserBean.activated}"
/></td>
<td><h:message
errorClass=
"errorMsg"
infoClass=
"infoMsg"
for=
"activated"
/></td>
</tr>
<tr>
<td
colspan=
"3"
class=
"taCenter"
>
<h:commandButton
id=
"update"
value=
"Enregistrer"
action=
"#{u
serMgr.sav
e}"
/>
 
<h:commandButton
id=
"update"
value=
"Enregistrer"
action=
"#{u
pdateUserBean.updat
e}"
/>
 
<h:commandButton
id=
"cancel"
value=
"Annuler"
action=
"#{userMgr.cancel}"
immediate=
"true"
>
</h:commandButton>
</td>
...
...
@@ -140,7 +140,7 @@
</p:panel>
<p:panel
headerClass=
"colDroite"
bodyClass=
"colTexte"
label=
"Import d'anciennes donnes"
switchType=
"ajax"
opened=
"true"
rendered=
"#{not empty(
add
UserBean.userId)}"
>
switchType=
"ajax"
opened=
"true"
rendered=
"#{not empty(
update
UserBean.userId)}"
>
<h:form>
<!-- <s:validateAll>-->
<p>
...
...
@@ -179,7 +179,7 @@
</h:form>
</p:panel>
<h:form
rendered=
"#{not empty(
add
UserBean.userId)}"
>
<h:form
rendered=
"#{not empty(
update
UserBean.userId)}"
>
<h3>
Dlgations
</h3>
<p>
Les sections suivantes rpertorient les diffrents lments pour lesquels l'utilisateur
...
...
Please
register
or
login
to post a comment