[jboss-svn-commits] JBL Code SVN: r18888 - in labs/jbosslabs/labs-3.0-build: services/credential/src/main/java/org/jboss/labs/auth/impl and 5 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Mar 12 11:50:11 EDT 2008
Author: szimano
Date: 2008-03-12 11:50:10 -0400 (Wed, 12 Mar 2008)
New Revision: 18888
Added:
labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/GlobalBinderAction.java
labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/include/
labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/include/choose_service_role.xhtml
labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/include/choose_user_role.xhtml
labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/manage_global.xhtml
labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/manage_project.xhtml
Removed:
labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/org/
labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/views/
Modified:
labs/jbosslabs/labs-3.0-build/core/core-api/src/main/java/org/jboss/labs/auth/RoleBinderService.java
labs/jbosslabs/labs-3.0-build/services/credential/src/main/java/org/jboss/labs/auth/impl/RoleBinderServiceImpl.java
labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/auth/ViewHelper.java
labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/auth/jsf/AuthEntityConverter.java
labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/ServiceManager.java
labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/UserManager.java
labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/home.xhtml
Log:
auth view JBLAB-901
Modified: labs/jbosslabs/labs-3.0-build/core/core-api/src/main/java/org/jboss/labs/auth/RoleBinderService.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/core/core-api/src/main/java/org/jboss/labs/auth/RoleBinderService.java 2008-03-12 15:40:23 UTC (rev 18887)
+++ labs/jbosslabs/labs-3.0-build/core/core-api/src/main/java/org/jboss/labs/auth/RoleBinderService.java 2008-03-12 15:50:10 UTC (rev 18888)
@@ -94,6 +94,22 @@
throws NoSuchUserRoleException, BindingAlreadyExistsException;
/**
+ * Binds given service role with a user role for a given project.
+ *
+ * @param serviceRole
+ * Service role
+ * @param role
+ * User role
+ * @param projectId
+ * Project id
+ * @throws NoSuchUserRoleException
+ * @throws BindingAlreadyExistsException
+ */
+ public void bindRolesWithProject(ServiceRole serviceRole, UserRole role,
+ String projectId) throws NoSuchUserRoleException,
+ BindingAlreadyExistsException;
+
+ /**
* Binds given service role with a user role for a given custom id.
*
* @param <E>
@@ -119,6 +135,28 @@
NoSuchCustomIDException;
/**
+ * Binds given service role with a user role for a given custom id.
+ *
+ * @param serviceRole
+ * Service role
+ * @param role
+ * User role
+ * @param customId
+ * Custom id
+ * @throws NoSuchUserRoleException
+ * If user role doesn't exist
+ * @throws BindingAlreadyExistsException
+ * If binding already exists
+ * @throws NoSuchCustomIDException
+ * If custom id doesn't exist
+ * @see org.jboss.labs.core.model.auth.CustomID
+ * @see org.jboss.labs.auth.custom.CustomIDProvider
+ */
+ public void bindRolesWithId(ServiceRole serviceRole, UserRole role,
+ CustomID customId) throws NoSuchUserRoleException,
+ BindingAlreadyExistsException, NoSuchCustomIDException;
+
+ /**
* Binds service role to a user role globally. This means that members of
* this user role will be able to perform actions bound to given service
* role in every context.
@@ -134,6 +172,19 @@
E serviceRole, UserRole role) throws NoSuchUserRoleException;
/**
+ * Binds service role to a user role globally. This means that members of
+ * this user role will be able to perform actions bound to given service
+ * role in every context.
+ *
+ * @param serviceRole
+ * Service role
+ * @param role
+ * User role
+ */
+ public void bindRolesGlobal(ServiceRole serviceRole, UserRole role)
+ throws NoSuchUserRoleException;
+
+ /**
* Grants superrole in a project to a user. User with a superrole can
* perform any actions in a project (checking isAllowedProject with this
* projectId will always return true)
Modified: labs/jbosslabs/labs-3.0-build/services/credential/src/main/java/org/jboss/labs/auth/impl/RoleBinderServiceImpl.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/services/credential/src/main/java/org/jboss/labs/auth/impl/RoleBinderServiceImpl.java 2008-03-12 15:40:23 UTC (rev 18887)
+++ labs/jbosslabs/labs-3.0-build/services/credential/src/main/java/org/jboss/labs/auth/impl/RoleBinderServiceImpl.java 2008-03-12 15:50:10 UTC (rev 18888)
@@ -78,39 +78,26 @@
throws NoSuchUserRoleException, BindingAlreadyExistsException,
NoSuchCustomIDException {
- // get custom IDs - this will persist new ones
- customIDService.getCustomIDs(getService(serviceRole));
+ bindRolesWithId(getServiceRole(serviceRole), role, customId);
- CustomID cidEn = manager.find(CustomID.class, customId.getAuthId());
-
- if (cidEn == null) {
- throw new NoSuchCustomIDException("CustomID with an id: "
- + customId.getAuthId() + " doesn't exist");
- }
-
- bindRolesWith(serviceRole, role, customId);
-
}
public <E extends Enum<E> & ServiceDescriptor> void bindRolesWithProject(
E serviceRole, UserRole role, String projectId)
throws NoSuchUserRoleException, BindingAlreadyExistsException {
- ProjectID pid = getProjectID(projectId);
+ bindRolesWithProject(getServiceRole(serviceRole), role, projectId);
- bindRolesWith(serviceRole, role, pid);
-
}
- private <E extends Enum<E> & ServiceDescriptor> void bindRolesWith(
- E serviceRole, UserRole role, AuthID authID)
- throws NoSuchUserRoleException, BindingAlreadyExistsException {
- ServiceRole srEn = getServiceRole(serviceRole);
+ private void bindRolesWith(ServiceRole serviceRole, UserRole role,
+ AuthID authID) throws NoSuchUserRoleException,
+ BindingAlreadyExistsException {
UserRole roleEn = userService.getUserRole(role);
- Service service = getService(serviceRole);
+ Service service = serviceRole.getService();
- if (getBinding(srEn, roleEn, authID, service) != null) {
+ if (getBinding(serviceRole, roleEn, authID, service) != null) {
throw new BindingAlreadyExistsException("Binding for servicerole: "
+ serviceRole + ", role: " + role + " and id: " + authID
+ " already exists");
@@ -119,7 +106,7 @@
Binding b = new Binding();
b.setAuthId(authID);
b.setService(service);
- b.setServiceRole(srEn);
+ b.setServiceRole(serviceRole);
b.setUserRole(roleEn);
manager.persist(b);
@@ -199,13 +186,7 @@
public <E extends Enum<E> & ServiceDescriptor> void bindRolesGlobal(
E serviceRole, UserRole role) throws NoSuchUserRoleException {
ServiceRole serviceRoleEn = getServiceRole(serviceRole);
- UserRole userRoleEn = userService.getUserRole(role);
-
- serviceRoleEn.addGlobalRole(userRoleEn);
- userRoleEn.addServiceRole(serviceRoleEn);
-
- manager.merge(serviceRoleEn);
- manager.merge(userRoleEn);
+ bindRolesGlobal(serviceRoleEn, role);
}
public void grantUserProjectSuperrole(Principal user, String projectId)
@@ -427,11 +408,67 @@
return manager.find(Service.class, serviceId);
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.jboss.labs.auth.RoleBinderService#getServiceRole(java.lang.String)
*/
public ServiceRole getServiceRole(String serviceRoleId) {
return manager.find(ServiceRole.class, serviceRoleId);
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.labs.auth.RoleBinderService#bindRolesGlobal(org.jboss.labs.core.model.auth.ServiceRole,
+ * org.jboss.labs.core.model.auth.UserRole)
+ */
+ public void bindRolesGlobal(ServiceRole serviceRole, UserRole role)
+ throws NoSuchUserRoleException {
+ UserRole userRoleEn = userService.getUserRole(role);
+
+ serviceRole.addGlobalRole(userRoleEn);
+ userRoleEn.addServiceRole(serviceRole);
+
+ manager.merge(serviceRole);
+ manager.merge(userRoleEn);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.labs.auth.RoleBinderService#bindRolesWithId(org.jboss.labs.core.model.auth.ServiceRole,
+ * org.jboss.labs.core.model.auth.UserRole,
+ * org.jboss.labs.core.model.auth.CustomID)
+ */
+ public void bindRolesWithId(ServiceRole serviceRole, UserRole role,
+ CustomID customId) throws NoSuchUserRoleException,
+ BindingAlreadyExistsException, NoSuchCustomIDException {
+ // get custom IDs - this will persist new ones
+ customIDService.getCustomIDs(serviceRole.getService());
+
+ CustomID cidEn = manager.find(CustomID.class, customId.getAuthId());
+
+ if (cidEn == null) {
+ throw new NoSuchCustomIDException("CustomID with an id: "
+ + customId.getAuthId() + " doesn't exist");
+ }
+
+ bindRolesWith(serviceRole, role, customId);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.labs.auth.RoleBinderService#bindRolesWithProject(org.jboss.labs.core.model.auth.ServiceRole,
+ * org.jboss.labs.core.model.auth.UserRole, java.lang.String)
+ */
+ public void bindRolesWithProject(ServiceRole serviceRole, UserRole role,
+ String projectId) throws NoSuchUserRoleException,
+ BindingAlreadyExistsException {
+ ProjectID pid = getProjectID(projectId);
+
+ bindRolesWith(serviceRole, role, pid);
+ }
+
}
Modified: labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/auth/ViewHelper.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/auth/ViewHelper.java 2008-03-12 15:40:23 UTC (rev 18887)
+++ labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/auth/ViewHelper.java 2008-03-12 15:50:10 UTC (rev 18888)
@@ -23,6 +23,7 @@
package org.jboss.labs.auth;
import javax.faces.application.FacesMessage;
+import javax.faces.application.FacesMessage.Severity;
import javax.faces.context.FacesContext;
/**
@@ -34,4 +35,14 @@
FacesContext.getCurrentInstance()
.addMessage(msg, new FacesMessage(msg));
}
+
+ /**
+ * @param message
+ */
+ public static void addErrorMessage(Exception e) {
+ FacesContext.getCurrentInstance().addMessage(
+ e.getMessage(),
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), e
+ .toString()));
+ }
}
Modified: labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/auth/jsf/AuthEntityConverter.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/auth/jsf/AuthEntityConverter.java 2008-03-12 15:40:23 UTC (rev 18887)
+++ labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/auth/jsf/AuthEntityConverter.java 2008-03-12 15:50:10 UTC (rev 18888)
@@ -65,7 +65,7 @@
return binderService.getService(objStr.substring(SERVICE.length()));
}
else if (objStr.startsWith(SERVICE_ROLE)) {
- return binderService.getServiceRole(objStr.substring(SERVICE.length()));
+ return binderService.getServiceRole(objStr.substring(SERVICE_ROLE.length()));
}
else {
return null;
Added: labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/GlobalBinderAction.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/GlobalBinderAction.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/GlobalBinderAction.java 2008-03-12 15:50:10 UTC (rev 18888)
@@ -0,0 +1,75 @@
+/*
+ * JBoss Labs. http://labs.jboss.com/jbosslabs
+ *
+ * Copyright (C) 2008 Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT A WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License, v.2.1 along with this distribution; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Red Hat Author(s): Bob McWhirter, Przemyslaw Dej, Ryszard Kozmik,
+ * Tomasz Szymanski, Adam Warski, Pawel Wrzeszcz
+ */
+package org.jboss.labs.view.auth.action;
+
+import org.jboss.labs.auth.RoleBinderService;
+import org.jboss.labs.auth.ViewHelper;
+import org.jboss.labs.core.model.auth.ServiceRole;
+import org.jboss.labs.core.model.auth.UserRole;
+import org.jboss.labs.exception.auth.NoSuchUserRoleException;
+import org.jboss.labs.injection.seam.Guice;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+
+import com.google.inject.Inject;
+
+/**
+ * @author tomaszszymanski
+ *
+ */
+ at Name("globalBinder")
+ at Guice
+public class GlobalBinderAction {
+
+ @Inject
+ private RoleBinderService binderService;
+
+ @In(required=false)
+ private UserRole currentRole;
+
+ @In(required = false)
+ private ServiceRole currentServiceRole;
+
+ public boolean isOk() {
+ if (currentRole == null) {
+ ViewHelper.addMessage("Please set User Role");
+ }
+ if (currentServiceRole == null) {
+ ViewHelper.addMessage("Please set Service Role");
+ }
+
+ return (currentRole != null && currentServiceRole != null);
+ }
+
+ public void add() {
+ if (currentRole != null && currentServiceRole != null) {
+ try {
+ binderService.bindRolesGlobal(currentServiceRole, currentRole);
+ ViewHelper.addMessage("Role bound");
+ } catch (NoSuchUserRoleException e) {
+ ViewHelper.addErrorMessage(e);
+ }
+ }
+ }
+}
+
Modified: labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/ServiceManager.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/ServiceManager.java 2008-03-12 15:40:23 UTC (rev 18887)
+++ labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/ServiceManager.java 2008-03-12 15:50:10 UTC (rev 18888)
@@ -32,6 +32,7 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.log.Log;
@@ -47,9 +48,10 @@
public class ServiceManager {
@Inject
private RoleBinderService binderService;
-
+
private Service currentService;
+ @Out(required = false)
private ServiceRole currentServiceRole;
private Set<Service> services;
@@ -62,6 +64,10 @@
}
public void setCurrentService(Service currentService) {
+ if (!currentService.equals(this.currentService)) {
+ currentServiceRole = null;
+ }
+
this.currentService = currentService;
}
@@ -77,7 +83,6 @@
if (currentService != null) {
return currentService.getServiceRoles();
} else {
- log.info("empty: #{service.currentService}");
return new HashSet<ServiceRole>();
}
}
Modified: labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/UserManager.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/UserManager.java 2008-03-12 15:40:23 UTC (rev 18887)
+++ labs/jbosslabs/labs-3.0-build/views/auth/src/main/java/org/jboss/labs/view/auth/action/UserManager.java 2008-03-12 15:50:10 UTC (rev 18888)
@@ -25,7 +25,15 @@
import java.util.List;
import java.util.Vector;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelection;
+import org.jboss.seam.log.Log;
import org.jboss.labs.auth.UserService;
import org.jboss.labs.core.model.auth.UserRole;
@@ -38,13 +46,37 @@
*
*/
@Name("users")
+ at Scope(ScopeType.PAGE)
@Guice
public class UserManager {
@Inject
private UserService userService;
+
+ @DataModelSelection
+ @Out(required = false)
+ private UserRole currentRole;
+
+ @DataModel
+ private List<UserRole> allRoles;
+
+ @Logger
+ private Log log;
- public List<UserRole> getAllRoles() {
- return new Vector<UserRole>(userService.getAllUserRoles());
+ @Factory("allRoles")
+ public void findRoles() {
+ allRoles = new Vector<UserRole>(userService.getAllUserRoles());
}
+
+ public void listRole() {
+ log.info("Bean: "+this+" role: "+currentRole);
+ }
+
+ public UserRole getCurrentRole() {
+ return currentRole;
+ }
+
+ public void setCurrentRole(UserRole currentRole) {
+ this.currentRole = currentRole;
+ }
}
Modified: labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/home.xhtml
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/home.xhtml 2008-03-12 15:40:23 UTC (rev 18887)
+++ labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/home.xhtml 2008-03-12 15:50:10 UTC (rev 18888)
@@ -10,24 +10,24 @@
<ui:define name="body">
<h2>What would you like to do ?</h2>
<h:form id="mainForm">
- <h:outputLink value="views/manage_global.seam"
- rendered="#{permission.allowedGlobal}">Manage global roles</h:outputLink>
- <rich:simpleTogglePanel width="100" opened="false" label="What is this ?"
- switchType="client">
- <rich:effect event="onclick" type="BlindDown"/>
-
+ <h:panelGroup layout="horizontal">
+ <h:outputLink value="manage_global.seam"
+ rendered="#{permission.allowedGlobal}">Manage global roles</h:outputLink>
+ <rich:simpleTogglePanel width="100" opened="false"
+ label="What is this ?" switchType="client">
This allows you assign global roles (user with a user role can do a specified action for given Service Role in *every* project).
For example - we want to make possible that user JohnFoo can edit pages in every project.
</rich:simpleTogglePanel>
-
- <h:outputLink value="views/manage_project.seam"
- rendered="#{permission.allowedGlobal}">Manage project roles</h:outputLink>
- <rich:simpleTogglePanel width="100" opened="false" label="What is this ?"
- switchType="client">
- <rich:effect event="onclick" type="BlindDown"/>
-
+ </h:panelGroup>
+
+ <h:panelGroup>
+ <h:outputLink value="manage_project.seam"
+ rendered="#{permission.allowedGlobal}">Manage project roles</h:outputLink>
+ <rich:simpleTogglePanel width="100" opened="false"
+ label="What is this ?" switchType="client">
This allows you assign roles to service roles for projects
</rich:simpleTogglePanel>
+ </h:panelGroup>
</h:form>
</ui:define>
</ui:composition>
Added: labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/include/choose_service_role.xhtml
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/include/choose_service_role.xhtml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/include/choose_service_role.xhtml 2008-03-12 15:50:10 UTC (rev 18888)
@@ -0,0 +1,27 @@
+<h:panelGroup xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j" template="/layout/template.xhtml">
+
+ <h:outputText value="Choose service"></h:outputText>
+
+ <h:selectOneRadio id="serviceList" value="#{services.currentService}">
+ <a4j:support event="onchange" reRender="serviceRoleList,msgs,buttons" />
+ <s:selectItems value="#{services.allServices}" var="service"
+ label="#{service.description}" />
+ <f:converter converterId="serviceEntity" />
+ </h:selectOneRadio>
+
+ <h:outputText value="Choose Service Role"></h:outputText>
+
+ <h:selectOneRadio id="serviceRoleList"
+ value="#{services.currentServiceRole}">
+ <a4j:support event="onchange" reRender="msgs,buttons" />
+ <s:selectItems value="#{services.serviceRoles}" var="serviceRole"
+ label="#{serviceRole.description}" />
+ <f:converter converterId="serviceEntity" />
+ </h:selectOneRadio>
+</h:panelGroup>
Added: labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/include/choose_user_role.xhtml
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/include/choose_user_role.xhtml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/include/choose_user_role.xhtml 2008-03-12 15:50:10 UTC (rev 18888)
@@ -0,0 +1,40 @@
+<h:panelGroup xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j" template="/layout/template.xhtml">
+
+ <rich:dataTable width="483" id="roleList" rows="10" columnClasses="col"
+ value="#{allRoles}" var="role" >
+
+ <f:facet name="header">
+ <rich:columnGroup>
+ <h:column>
+ <h:outputText styleClass="headerText" value="Id" />
+ </h:column>
+ <h:column>
+ <h:outputText styleClass="headerText" value="Description" />
+ </h:column>
+ <h:column></h:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ <h:column>
+ <h:outputText value="#{role.id}" />
+ </h:column>
+
+ <h:column>
+ <h:outputText value="#{role.description}" />
+ </h:column>
+
+ <h:column>
+ <a4j:commandButton value="Choose" reRender="msgs,buttons" action="#{users.listRole}"/>
+ </h:column>
+ </rich:dataTable>
+
+ <rich:spacer height="30" />
+ <rich:datascroller id="listScroller" align="left" for="roleList"
+ maxPages="20" />
+</h:panelGroup>
\ No newline at end of file
Added: labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/manage_global.xhtml
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/manage_global.xhtml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/manage_global.xhtml 2008-03-12 15:50:10 UTC (rev 18888)
@@ -0,0 +1,25 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j"
+ template="/layout/template.xhtml">
+
+ <ui:define name="body">
+
+ <a4j:form>
+
+ <ui:include src="include/choose_service_role.xhtml" />
+
+ <ui:include src="include/choose_user_role.xhtml" />
+
+ <h:panelGroup id="buttons">
+ <a4j:commandButton action="#{globalBinder.add}" value="Set" reRender="msgs" disabled="#{! globalBinder.ok}"/>
+ </h:panelGroup>
+ </a4j:form>
+ </ui:define>
+</ui:composition>
Added: labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/manage_project.xhtml
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/manage_project.xhtml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/views/auth/src/main/webapp/manage_project.xhtml 2008-03-12 15:50:10 UTC (rev 18888)
@@ -0,0 +1,16 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ template="/layout/template.xhtml">
+
+ <ui:define name="body">
+ <h:selectOneRadio>
+ <s:selectItems value="#{projects.allProjects}" var="project" label="#{project.name}" itemValue="#{project.projectId}"/>
+ </h:selectOneRadio>
+ </ui:define>
+</ui:composition>
More information about the jboss-svn-commits
mailing list