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 ebea83bd
authored
Mar 21, 2010
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of dev.intra.insomnia.fi:/data/bortal
2 parents
3beac554
8c62abba
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
233 additions
and
18 deletions
code/LanBortalWeb/WebContent/NotImplementedYet.xhtml
code/LanBortalWeb/WebContent/WEB-INF/faces-config.xml
code/LanBortalWeb/WebContent/modulePossibleReturnValues.xhtml
code/LanBortalWeb/WebContent/resources/tools/user/edit.xhtml
code/LanBortalWeb/WebContent/resources/tools/user/list.xhtml.orig
code/LanBortalWeb/WebContent/user/edit.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/handler/SessionHandler.java
code/LanBortalWeb/src/fi/insomnia/bortal/view/UserView.java
code/LanBortalWeb/WebContent/NotImplementedYet.xhtml
0 → 100644
View file @
ebea83b
<?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"
>
<h:head>
<title>
Facelet Title
</title>
</h:head>
<h:body>
Olemme laiskoja paskiaisia -> emme ole vielä tehneet ominaisuutta mitä yritit käyttää.
Pirä kivaa.
</h:body>
</html>
code/LanBortalWeb/WebContent/WEB-INF/faces-config.xml
View file @
ebea83b
...
@@ -29,5 +29,28 @@
...
@@ -29,5 +29,28 @@
<to-view-id>
/NotImplementedYet.xhtml
</to-view-id>
<to-view-id>
/NotImplementedYet.xhtml
</to-view-id>
</navigation-case>
</navigation-case>
</navigation-rule>
</navigation-rule>
<navigation-rule>
<from-view-id>
/user/edit.xhtml
</from-view-id>
<navigation-case>
<from-outcome>
userSave
</from-outcome>
<to-view-id>
/NotImplementedYet.xhtml
</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>
/resources/tools/user/list.xhtml
</from-view-id>
<navigation-case>
<from-outcome>
userEdit
</from-outcome>
<to-view-id>
/modulePossibleReturnValues.xhtml
</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>
/resources/tools/user/edit.xhtml
</from-view-id>
<navigation-case>
<from-outcome>
userSave
</from-outcome>
<to-view-id>
/modulePossibleReturnValues.xhtml
</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
</faces-config>
code/LanBortalWeb/WebContent/modulePossibleReturnValues.xhtml
0 → 100644
View file @
ebea83b
<?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"
>
<h:head>
<title>
Facelet Title
</title>
</h:head>
<h:body>
You should not be here, sorry for your lost.
</h:body>
</html>
code/LanBortalWeb/WebContent/resources/tools/user/edit.xhtml
0 → 100644
View file @
ebea83b
<?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"
>
<composite:interface>
</composite:interface>
<composite:implementation>
<h:form>
<h:panelGrid
columns=
"2"
>
<h:outputLabel
value=
"#{i18n['user.nick']}:"
/><h:outputLabel
value=
"#{userView.user.nick}"
/>
<h:outputLabel
value=
"#{i18n['user.lastName']}:"
/><h:inputText
value=
"#{userView.user.lastname}"
/>
<h:outputLabel
value=
"#{i18n['user.firstNames']}:"
/><h:inputText
value=
"#{userView.user.firstnames}"
/>
<h:outputLabel
value=
"#{i18n['user.address']}:"
/><h:inputText
value=
"#{userView.user.address}"
/>
<h:outputLabel
value=
"#{i18n['user.zipCode']}:"
/><h:inputText
value=
"#{userView.user.zip}"
/>
<h:outputLabel
value=
"#{i18n['user.town']}:"
/><h:inputText
value=
"#{userView.user.town}"
/>
<h:outputLabel
value=
"#{i18n['user.sex']}:"
/>
<h:selectOneRadio
id=
"sex"
value=
"#{userView.user.female}"
>
<f:selectItem
id=
"male"
itemLabel=
"Male"
itemValue=
"false"
/>
<f:selectItem
id=
"female"
itemLabel=
"Female"
itemValue=
"true"
/>
</h:selectOneRadio>
<h:commandButton
action=
"#{userView.saveUser()}"
value=
"#{i18n['save']}"
/>
</h:panelGrid>
</h:form>
</composite:implementation>
</html>
code/LanBortalWeb/WebContent/resources/tools/user/list.xhtml.orig
0 → 100644
View file @
ebea83b
<?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"
>
<composite:interface>
</composite:interface>
<composite:implementation>
<tools:authorization>
<h:form>
<h:dataTable
border=
"1"
id=
"user"
value=
"#{userView.users}"
var=
"user"
>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Id"
/>
</f:facet>
<h:outputText
value=
"#{user.id}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Real name"
/>
</f:facet>
<h:outputText
value=
"#{user.firstnames}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Address"
/>
</f:facet>
<h:outputText
value=
"#{user.address}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Town"
/>
</f:facet>
<h:outputText
value=
"#{user.town}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Zip"
/>
</f:facet>
<h:outputText
value=
"#{user.zip}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Phone number"
/>
</f:facet>
<h:outputText
value=
"#{user.phone}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Sex"
/>
</f:facet>
<h:outputText
value=
"#{user.female}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Edit"
/>
</f:facet>
<h:commandButton
action=
"#{userView.edit()}"
value=
"Edit"
/>
</h:column>
</h:dataTable>
</h:form>
</tools:authorization>
<<<<<<
< HEAD:code
/
LanBortalWeb
/
WebContent
/
resources
/
tools
/
user
/
list
.
xhtml
<
h:form
>
<c:choose>
<c:when
test=
'#{sessionHandler.hasPermission("userList", "read") }'
>
<h:dataTable
border=
"1"
id=
"user"
value=
"#{userView.users}"
var=
"user"
>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Id"
/>
</f:facet>
<h:outputText
value=
"#{user.id}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Real name"
/>
</f:facet>
<h:outputText
value=
"#{user.firstnames}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Address"
/>
</f:facet>
<h:outputText
value=
"#{user.address}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Town"
/>
</f:facet>
<h:outputText
value=
"#{user.town}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Zip"
/>
</f:facet>
<h:outputText
value=
"#{user.zip}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Phone number"
/>
</f:facet>
<h:outputText
value=
"#{user.phone}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Sex"
/>
</f:facet>
<h:outputText
value=
"#{user.female}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Edit"
/>
</f:facet>
<h:commandButton
action=
"#{userView.edit()}"
value=
"Edit"
/>
</h:column>
</h:dataTable>
=======
>>>>>>> 88dd770a0c6918b609e680574909fcf7a16f8d64:code/LanBortalWeb/WebContent/resources/tools/user/list.xhtml
</composite:implementation>
</html>
code/LanBortalWeb/WebContent/user/edit.xhtml
View file @
ebea83b
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:users=
"http://java.sun.com/jsf/composite/tools/user"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
>
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
>
<h:head>
<h:head>
<title></title>
<title></title>
...
@@ -15,22 +16,7 @@
...
@@ -15,22 +16,7 @@
<ui:define
name=
"header"
>
Add new user
</ui:define>
<ui:define
name=
"header"
>
Add new user
</ui:define>
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
<h:form>
<users:edit
/>
<h:panelGrid
columns=
"2"
>
<h:outputLabel
value=
"Nick:"
/><h:outputLabel
value=
"#{userView.user.nick}"
/>
<h:outputLabel
value=
"Last name"
/><h:inputText
value=
"#{userView.user.lastname}"
/>
<h:outputLabel
value=
"First names"
/><h:inputText
value=
"#{userView.user.firstnames}"
/>
<h:outputLabel
value=
"Address"
/><h:inputText
value=
"#{userView.user.address}"
/>
<h:outputLabel
value=
"Zip Code"
/><h:inputText
value=
"#{userView.user.zip}"
/>
<h:outputLabel
value=
"Town"
/><h:inputText
value=
"#{userView.user.town}"
/>
<h:outputLabel
value=
"Sex"
/>
<h:selectOneRadio
id=
"sex"
value=
"#{userView.user.female}"
>
<f:selectItem
id=
"male"
itemLabel=
"Male"
itemValue=
"false"
/>
<f:selectItem
id=
"female"
itemLabel=
"Female"
itemValue=
"true"
/>
</h:selectOneRadio>
<h:commandButton
action=
"#{userView.saveUser()}"
value=
"Save"
/>
</h:panelGrid>
</h:form>
</ui:define>
</ui:define>
<ui:define
name=
"footer"
>
footer
</ui:define>
<ui:define
name=
"footer"
>
footer
</ui:define>
</ui:composition>
</ui:composition>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/handler/SessionHandler.java
View file @
ebea83b
...
@@ -43,7 +43,7 @@ public class SessionHandler {
...
@@ -43,7 +43,7 @@ public class SessionHandler {
}
}
public
boolean
hasPermission
(
String
target
,
RolePermission
permission
)
{
public
boolean
hasPermission
(
String
target
,
RolePermission
permission
)
{
return
fals
e
;
return
tru
e
;
//return handlerbean.hasPermission(target, getUser(), permission);
//return handlerbean.hasPermission(target, getUser(), permission);
}
}
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/view/UserView.java
View file @
ebea83b
...
@@ -52,7 +52,7 @@ public class UserView {
...
@@ -52,7 +52,7 @@ public class UserView {
public
String
saveUser
()
{
public
String
saveUser
()
{
userBean
.
mergeChanges
(
getUser
());
userBean
.
mergeChanges
(
getUser
());
return
"
edit
"
;
return
"
userSave
"
;
}
}
public
ListDataModel
<
User
>
getUsers
()
{
public
ListDataModel
<
User
>
getUsers
()
{
...
...
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