Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3c29d0e7
authored
Jun 06, 2014
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kuvanotto ja sessiohäsmäkkä korjattu pääosin
1 parent
c67cbe61
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
6 deletions
code/MoyaWeb/WebContent/admin/adduser/update.xhtml
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/AuthView.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/UserView.java
code/MoyaWeb/WebContent/admin/adduser/update.xhtml
View file @
3c29d0e
...
@@ -12,9 +12,12 @@
...
@@ -12,9 +12,12 @@
</f:metadata>
</f:metadata>
<ui:define
name=
"topbar"
>
<ui:define
name=
"topbar"
>
<h:link
styleClass=
"userbackbutton"
outcome=
"/admin/adduser/index"
>
<h:form>
<h:commandLink
styleClass=
"userbackbutton"
action=
"#{userView.incomingPhotoReady}"
value=
"Valmis"
>
<div>
#{i18n['adduser.back']}
</div>
<div>
#{i18n['adduser.back']}
</div>
</h:link>
</h:commandLink>
</h:form>
</ui:define>
</ui:define>
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
...
@@ -44,15 +47,17 @@
...
@@ -44,15 +47,17 @@
</h:form>
</h:form>
</div>
</div>
<div
style=
""
>
<div
style=
""
>
<h:link
style=
"margin: 0 auto; font-size: 3em;"
outcome=
"/admin/adduser/index"
value=
"Valmis"
/>
<h:form>
<h:commandLink
style=
"margin: 0 auto; font-size: 3em;"
action=
"#{userView.incomingPhotoReady}"
value=
"Valmis"
/>
</h:form>
</div>
</div>
<script>
<script>
function
dophoto
(
pc
)
{
function
dophoto
(
pc
)
{
docount
(
5
,
pc
);
docount
(
5
,
pc
);
}
}
function
docount
(
count
,
pc
)
{
function
docount
(
count
,
pc
)
{
$
(
'#count'
).
html
(
count
);
$
(
'#count'
).
html
(
count
);
$
(
'#count'
).
css
(
"opacity"
,
1
);
$
(
'#count'
).
css
(
"opacity"
,
1
);
$
(
'#count'
).
css
(
"font-size"
,
"28pt"
);
$
(
'#count'
).
css
(
"font-size"
,
"28pt"
);
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/AuthView.java
View file @
3c29d0e
...
@@ -85,6 +85,22 @@ public class AuthView extends GenericCDIView {
...
@@ -85,6 +85,22 @@ public class AuthView extends GenericCDIView {
return
"/frontpage"
;
return
"/frontpage"
;
}
}
public
void
executeLogoutNoRedirect
()
{
HttpServletRequest
req
=
getRequest
();
if
(
permbean
.
isLoggedIn
())
{
try
{
req
.
logout
();
}
catch
(
ServletException
e
)
{
logger
.
warn
(
"Error executing logout"
,
e
);
}
}
req
.
getSession
().
invalidate
();
}
public
void
executeLogin
()
{
public
void
executeLogin
()
{
executeLogin
(
null
);
executeLogin
(
null
);
}
}
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/UserView.java
View file @
3c29d0e
...
@@ -393,7 +393,7 @@ public class UserView extends GenericCDIView {
...
@@ -393,7 +393,7 @@ public class UserView extends GenericCDIView {
public
String
createUserAdduserView
()
{
public
String
createUserAdduserView
()
{
userbean
.
createNewUser
(
user
,
getPassword
());
userbean
.
createNewUser
(
user
,
getPassword
());
//
authView.executeAdduserAutoLogin(user, getPassword());
authView
.
executeAdduserAutoLogin
(
user
,
getPassword
());
return
"/admin/adduser/update"
;
return
"/admin/adduser/update"
;
}
}
...
@@ -403,6 +403,14 @@ public class UserView extends GenericCDIView {
...
@@ -403,6 +403,14 @@ public class UserView extends GenericCDIView {
return
"/useradmin/edit"
;
return
"/useradmin/edit"
;
}
}
// /admin/adduser/index
public
String
incomingPhotoReady
()
{
authView
.
executeLogoutNoRedirect
();
navihandler
.
forward
(
"/admin/adduser/index?faces-redirect=true"
);
return
"/admin/adduser/index"
;
}
public
void
setUserid
(
Integer
userid
)
{
public
void
setUserid
(
Integer
userid
)
{
this
.
userid
=
userid
;
this
.
userid
=
userid
;
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment