Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2da241d9
authored
Mar 21, 2010
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
role stuff
1 parent
c14d376b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
74 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/view/RoleView.java
code/LanBortalWeb/WebContent/WEB-INF/faces-config.xml
View file @
2da241d
...
@@ -50,7 +50,15 @@
...
@@ -50,7 +50,15 @@
<to-view-id>
/modulePossibleReturnValues.xhtml
</to-view-id>
<to-view-id>
/modulePossibleReturnValues.xhtml
</to-view-id>
</navigation-case>
</navigation-case>
</navigation-rule>
</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>
</faces-config>
</faces-config>
code/LanBortalWeb/WebContent/resources/tools/role/list.xhtml
View file @
2da241d
...
@@ -2,82 +2,56 @@
...
@@ -2,82 +2,56 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns=
"http://www.w3.org/1999/xhtml"
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:composite=
"http://java.sun.com/jsf/composite"
xmlns:composite=
"http://java.sun.com/jsf/composite"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:tools=
"http://java.sun.com/jsf/composite/tools"
>
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>
</html>
code/LanBortalWeb/src/accessRightTargets
View file @
2da241d
userManagement
userManagement
\ No newline at end of file
roleManagement
\ No newline at end of file
code/LanBortalWeb/src/fi/insomnia/bortal/view/RoleView.java
View file @
2da241d
...
@@ -21,7 +21,7 @@ import org.slf4j.LoggerFactory;
...
@@ -21,7 +21,7 @@ import org.slf4j.LoggerFactory;
*
*
* @author tuukka
* @author tuukka
*/
*/
@ManagedBean
(
name
=
"
R
oleView"
)
@ManagedBean
(
name
=
"
r
oleView"
)
@SessionScoped
@SessionScoped
public
class
RoleView
{
public
class
RoleView
{
...
@@ -41,6 +41,12 @@ public class RoleView {
...
@@ -41,6 +41,12 @@ public class RoleView {
}
}
public
String
edit
()
{
role
=
items
.
getRowData
();
return
"roleEdit"
;
}
/** Creates a new instance of RoleView */
/** Creates a new instance of RoleView */
public
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