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-12 12:33:18 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c68033e6c1ea9f992ffc0b76c3c8788eaf04a8cf
c68033e6
1 parent
23d168a6
Simplification page
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
src/main/java/org/legrog/presentation/UpdateUserBean.java
src/main/webapp/WEB-INF/faces-config.xml
src/main/webapp/updateUser.xhtml
src/main/java/org/legrog/presentation/UpdateUserBean.java
View file @
c68033e
...
...
@@ -106,11 +106,11 @@ public class UpdateUserBean {
}
public
String
prepareUpdate
(
int
userId
)
{
ExternalContext
externalContext
=
FacesContext
.
getCurrentInstance
().
getExternalContext
();
Logger
logger
=
LoggerFactory
.
getLogger
(
UpdateUserBean
.
class
);
logger
.
info
(
"prepareUpdate"
);
logger
.
info
(
"userId ="
+
userId
);
this
.
userId
=
userId
;
if
(
userId
!=
0
)
{
User
user
=
userService
.
findUserById
(
userId
);
if
(
user
!=
null
)
{
...
...
@@ -123,6 +123,7 @@ public class UpdateUserBean {
firstName
=
user
.
getFirstName
();
lastName
=
user
.
getLastName
();
nickName
=
user
.
getNickName
();
password
=
user
.
getPassword
();
presentation
=
user
.
getPresentation
();
roles
=
user
.
getRoles
();
if
(
roles
==
null
)
{
...
...
@@ -137,6 +138,10 @@ public class UpdateUserBean {
}
public
String
update
()
{
Logger
logger
=
LoggerFactory
.
getLogger
(
UpdateUserBean
.
class
);
logger
.
info
(
"update"
);
logger
.
info
(
"userId ="
+
userId
);
User
user
=
userService
.
findUserById
(
userId
);
user
.
setActivated
(
activated
);
user
.
setAnonymous
(
anonymous
);
...
...
@@ -155,6 +160,7 @@ public class UpdateUserBean {
userService
.
updateUser
(
user
);
return
"success"
;
}
public
String
getFirstName
()
{
return
firstName
;
}
...
...
src/main/webapp/WEB-INF/faces-config.xml
View file @
c68033e
...
...
@@ -79,6 +79,10 @@
<from-outcome>
cancel
</from-outcome>
<to-view-id>
/listUsers.xhtml
</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>
success
</from-outcome>
<to-view-id>
/listUsers.xhtml
</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>
/listUsers.xhtml
</from-view-id>
...
...
src/main/webapp/updateUser.xhtml
View file @
c68033e
...
...
@@ -90,7 +90,7 @@
</td>
<td
colspan=
"2"
>
<!--<rich:editor id="text" value="#{updateUserBean.presentation}" configuration="article-editor"/>-->
</td>
</tr>
<
!--
<
ui:remove>
<ui:fragment
rendered=
"#{updateUserBean.userId != 0}"
>
<tr>
<td
colspan=
"3"
class=
"taCenter"
>
...
...
@@ -109,7 +109,7 @@
</td>
</tr>
</ui:fragment>
--
>
</ui:remove
>
<tr>
<td><h:outputLabel
for=
"criticProvider"
>
Archives de critiques ?
</h:outputLabel></td>
<td><h:selectBooleanCheckbox
id=
"criticProvider"
value=
"#{updateUserBean.criticProvider}"
/></td>
...
...
@@ -133,11 +133,11 @@
</table>
</h:form>
</p:panel>
<ui:remove>
<p:panel
headerClass=
"colDroite"
bodyClass=
"colTexte"
label=
"Import d'anciennes donnes"
switchType=
"ajax"
opened=
"true"
rendered=
"#{updateUserBean.userId != 0}"
>
<h:form>
<!--
<s:validateAll>-->
<!--
<s:validateAll>-->
<p>
La prsente section est destine raffecter des critiques, des commentaires ou des
articles posts dans le Grog v1 par cet utilisateur. N'effectuez cette opration qu'en
...
...
@@ -173,6 +173,7 @@
<!--</s:validateAll>-->
</h:form>
</p:panel>
</ui:remove>
<!--
<h:form rendered="#{updateUserBean.userId != 0}">
<h3>Dlgations</h3>
...
...
Please
register
or
login
to post a comment