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 baffa4ac
authored
Mar 21, 2010
by
Juho Juopperi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of dev.intra.insomnia.fi:/data/bortal
2 parents
95545241
02841205
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
127 additions
and
132 deletions
code/LanBortalWeb/WebContent/WEB-INF/faces-config.xml
code/LanBortalWeb/WebContent/resources/tools/role/list.xhtml
code/LanBortalWeb/src/accessRightTargets
code/LanBortalWeb/src/fi/insomnia/bortal/handler/SessionHandler.java
code/LanBortalWeb/src/fi/insomnia/bortal/view/RoleView.java
code/LanBortalWeb/WebContent/WEB-INF/faces-config.xml
View file @
baffa4a
<?xml version="1.0"?>
<faces-config
xmlns=
"http://java.sun.com/xml/ns/javaee"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version=
"2.0"
>
<application>
<resource-bundle>
<base-name>
i18n
</base-name>
<var>
i18n
</var>
</resource-bundle>
<message-bundle>
resources.i18n
</message-bundle>
<!-- Legal Country codes: http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm -->
<!-- Assigned Country codes: -->
<!-- Insomnia: IN (INDIA) -->
<!-- Stream: ST (SAO TOME AND PRINCIPE ) -->
<!-- Vector VE (VENEZUELA, BOLIVARIAN REPUBLIC OF) -->
<locale-config>
<default-locale>
fi
</default-locale>
<supported-locale>
fi_IN_XII
</supported-locale>
<supported-locale>
en_ST_v7
</supported-locale>
xmlns=
"http://java.sun.com/xml/ns/javaee"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version=
"2.0"
>
<application>
<resource-bundle>
<base-name>
i18n
</base-name>
<var>
i18n
</var>
</resource-bundle>
<message-bundle>
resources.i18n
</message-bundle>
<!-- Legal Country codes: http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm -->
<!-- Assigned Country codes: -->
<!-- Insomnia: IN (INDIA) -->
<!-- Stream: ST (SAO TOME AND PRINCIPE ) -->
<!-- Vector VE (VENEZUELA, BOLIVARIAN REPUBLIC OF) -->
<locale-config>
<default-locale>
fi
</default-locale>
<supported-locale>
fi_IN_XII
</supported-locale>
<supported-locale>
en_ST_v7
</supported-locale>
</locale-config>
</application>
<navigation-rule>
<from-view-id>
*
</from-view-id>
<navigation-case>
<from-outcome>
permissionDenied
</from-outcome>
<to-view-id>
/permissionDenied.xhtml
</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>
/user/list.xhtml
</from-view-id>
<navigation-case>
<from-outcome>
userEdit
</from-outcome>
<to-view-id>
/NotImplementedYet.xhtml
</to-view-id>
</navigation-case>
</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>
</locale-config>
</application>
<navigation-rule>
<from-view-id>
/user/list.xhtml
</from-view-id>
<navigation-case>
<from-outcome>
userEdit
</from-outcome>
<to-view-id>
/NotImplementedYet.xhtml
</to-view-id>
</navigation-case>
</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>
<navigation-rule>
<from-view-id>
/resources/tools/role/list.xhtml
</from-view-id>
<navigation-case>
<from-outcome>
roleEdit
</from-outcome>
<to-view-id>
/modulePossibleReturnValues.xhtml
</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>
*
</from-view-id>
<navigation-case>
<from-outcome>
permissionDenied
</from-outcome>
<to-view-id>
/permissionDenied.xhtml
</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
code/LanBortalWeb/WebContent/resources/tools/role/list.xhtml
View file @
baffa4a
...
...
@@ -2,82 +2,56 @@
<!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"
>
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:interface>
</composite:interface>
<composite:implementation>
<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>
<h:form>
<tools:canRead
target=
"roleManagement"
>
<h:dataTable
border=
"1"
id=
"user"
value=
"#{roleView.roles}"
var=
"role"
>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#"
/>
</f:facet>
<h:outputText
value=
"#{role.id}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['role.name']}"
/>
</f:facet>
<h:outputText
value=
"#{role.name}"
/>
</h:column>
<tools:canWrite
target=
"roleManagement"
>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Edit"
/>
</f:facet>
<h:commandButton
action=
"#{roleView.edit()}"
value=
"Edit"
/>
</h:column>
</tools:canWrite>
</h:dataTable>
</tools:canRead>
</h:form>
</tools:authorization>
</composite:implementation>
</composite:implementation>
</html>
code/LanBortalWeb/src/accessRightTargets
View file @
baffa4a
userManagement
\ No newline at end of file
userManagement
roleManagement
\ No newline at end of file
code/LanBortalWeb/src/fi/insomnia/bortal/handler/SessionHandler.java
View file @
baffa4a
...
...
@@ -69,4 +69,8 @@ public class SessionHandler {
return
user
;
}
public
boolean
hasLoggedIn
()
{
throw
new
UnsupportedOperationException
();
}
}
code/LanBortalWeb/src/fi/insomnia/bortal/view/RoleView.java
View file @
baffa4a
...
...
@@ -21,7 +21,7 @@ import org.slf4j.LoggerFactory;
*
* @author tuukka
*/
@ManagedBean
(
name
=
"
R
oleView"
)
@ManagedBean
(
name
=
"
r
oleView"
)
@SessionScoped
public
class
RoleView
{
...
...
@@ -41,6 +41,12 @@ public class RoleView {
}
public
String
edit
()
{
role
=
items
.
getRowData
();
return
"roleEdit"
;
}
/** Creates a new instance of RoleView */
public
RoleView
()
{
}
...
...
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