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 9b5ee3e2
authored
May 10, 2013
by
Petri Jarvisalo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userview
1 parent
30aaa2bc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
21 deletions
code/MoyaWeb/WebContent/admin/adduser/update.xhtml
code/MoyaWeb/WebContent/resources/cditools/user/edit.xhtml
code/MoyaWeb/WebContent/resources/cditools/user/usertabs.xhtml
code/MoyaWeb/WebContent/shop/createBill.xhtml
code/MoyaWeb/WebContent/useradmin/edit.xhtml
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/UserView.java
code/MoyaWeb/WebContent/admin/adduser/update.xhtml
View file @
9b5ee3e
...
...
@@ -8,6 +8,7 @@
<f:metadata>
<f:viewParam
name=
"userid"
value=
"#{userView.userid}"
/>
<f:event
type=
"preRenderView"
listener=
"#{userView.initView}"
/>
<f:event
type=
"preRenderView"
listener=
"#{userView.setCaptureForwardUrl('/admin/adduser/capturesuccess')}"
/>
</f:metadata>
<ui:define
name=
"topbar"
>
...
...
code/MoyaWeb/WebContent/resources/cditools/user/edit.xhtml
View file @
9b5ee3e
This diff is collapsed.
Click to expand it.
code/MoyaWeb/WebContent/resources/cditools/user/usertabs.xhtml
View file @
9b5ee3e
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:composite=
"http://java.sun.com/jsf/composite"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:tools=
"http://java.sun.com/jsf/composite/tools"
>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:composite=
"http://java.sun.com/jsf/composite"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:tools=
"http://java.sun.com/jsf/composite/tools"
>
<composite:interface>
<composite:attribute
name=
"tabId"
type=
"java.lang.String"
required=
"true"
/>
</composite:interface>
<composite:implementation>
<h:outputStylesheet
library=
"templates/#{sessionHandler.templateName}/css"
name=
"tabnav.css"
/>
<div
class=
"userstatus"
style=
"float: right; margin-right: 10px; color: #7DAC0C; font-size: 16px;"
>
<h:outputStylesheet
library=
"templates/#{sessionHandler.templateName}/css"
name=
"tabnav.css"
/>
<h2>
<h:outputText
value=
"#{i18n['usertitle.managingUser']}: #{userView.user.nick} / #{userView.user.wholeName} "
/>
</h2>
<h2>
<h:outputText
value=
"#{i18n['user.cardPower']}: #{userView.usersCardtemplate.name}"
/>
</div>
<ui:fragment
rendered=
"#{!userView.currentUser}"
>
<h2>
<h:outputText
value=
"#{i18n['usertitle.managingUser']}: #{userView.user.nick} / #{userView.user.wholeName} "
/>
</h2>
</ui:fragment>
</h2>
<div
id=
"#{cc.attrs.tabId}"
>
<ul
id=
"usertabnav"
>
<li
class=
"edit"
><h:link
outcome=
"/useradmin/edit"
value=
"#{i18n['user.edit']}"
>
...
...
@@ -41,13 +40,10 @@
<li
class=
"picture"
><h:link
outcome=
"/useradmin/sendPicture"
value=
"#{i18n['submenu.user.sendPicture']}"
>
<f:param
name=
"userid"
value=
"#{userView.user.user.id}"
/>
</h:link>
</li>
<li
class=
"foodwave"
>
<h:link
outcome=
"/useradmin/foodwaveshop"
value=
"#{i18n['submenu.user.foodwave']}"
>
</h:link></li>
<li
class=
"foodwave"
><h:link
outcome=
"/useradmin/foodwaveshop"
value=
"#{i18n['submenu.user.foodwave']}"
>
<f:param
name=
"userid"
value=
"#{userView.user.user.id}"
/>
</h:link>
</li>
</h:link></li>
</ul>
</div>
...
...
code/MoyaWeb/WebContent/shop/createBill.xhtml
View file @
9b5ee3e
...
...
@@ -23,7 +23,7 @@
<h:message
for=
"allowStats"
/>
</h:panelGrid>
<p:inputTextarea
rendered=
"#{productShopView.gather
r
BillInfo}"
value=
"#{productShopView.otherInfo}"
label=
"#{i18n['otherInfo']}"
/>
<p:inputTextarea
rendered=
"#{productShopView.gatherBillInfo}"
value=
"#{productShopView.otherInfo}"
label=
"#{i18n['otherInfo']}"
/>
</h:form>
</ui:define>
...
...
code/MoyaWeb/WebContent/useradmin/edit.xhtml
View file @
9b5ee3e
...
...
@@ -6,8 +6,9 @@
<h:body>
<ui:composition
template=
"#{sessionHandler.template}"
>
<f:metadata>
<f:viewParam
name=
"userid"
value=
"#{userView.userid}"
/>
<f:viewParam
name=
"userid"
value=
"#{userView.userid}"
/>
<f:event
type=
"preRenderView"
listener=
"#{userView.initView}"
/>
<f:event
type=
"preRenderView"
listener=
"#{userView.setCaptureForwardUrl('')}"
/>
</f:metadata>
<ui:define
name=
"title"
>
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/UserView.java
View file @
9b5ee3e
...
...
@@ -104,7 +104,8 @@ public class UserView extends GenericCDIView {
private
MassPrintResult
mpr
=
null
;
private
boolean
waitForAcceptance
=
false
;
private
String
captureForwardUrl
=
""
;
@Produces
@LoggedIn
public
EventUser
getCurrentUser
()
{
...
...
@@ -116,7 +117,9 @@ public class UserView extends GenericCDIView {
byte
[]
data
=
captureEvent
.
getData
();
UserImage
img
=
userbean
.
uploadImage
(
user
,
"image/png"
,
data
,
"userimage.png"
,
"Uploaded image"
);
user
=
userbean
.
getEventUser
(
img
.
getUser
());
super
.
navihandler
.
forward
(
"/admin/adduser/capturesuccess"
);
// super.navihandler.forward("/admin/adduser/capturesuccess");
if
(
getCaptureForwardUrl
().
equals
(
""
))
super
.
navihandler
.
forward
(
getCaptureForwardUrl
());
}
@Produces
...
...
@@ -431,4 +434,12 @@ public class UserView extends GenericCDIView {
public
void
setStreamedFile
(
StreamedContent
streamedFile
)
{
this
.
streamedFile
=
streamedFile
;
}
public
String
getCaptureForwardUrl
()
{
return
captureForwardUrl
;
}
public
void
setCaptureForwardUrl
(
String
captureForwardUrl
)
{
this
.
captureForwardUrl
=
captureForwardUrl
;
}
}
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