[seam-commits] Seam SVN: r13450 - in modules/security/trunk: examples/idmconsole/src/main/webapp/WEB-INF and 2 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Jul 20 07:17:07 EDT 2010


Author: shane.bryzak at jboss.com
Date: 2010-07-20 07:17:07 -0400 (Tue, 20 Jul 2010)
New Revision: 13450

Added:
   modules/security/trunk/examples/idmconsole/src/main/webapp/groupdetail.xhtml
Modified:
   modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml
   modules/security/trunk/examples/idmconsole/src/main/webapp/userdetail.xhtml
   modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/action/GroupAction.java
   modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/action/UserAction.java
   modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/IdentitySessionProducer.java
Log:
improve navigation


Modified: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml	2010-07-20 10:52:06 UTC (rev 13449)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml	2010-07-20 11:17:07 UTC (rev 13450)
@@ -10,6 +10,7 @@
    
    <navigation-rule>
       <from-view-id>/manageusers.xhtml</from-view-id>
+      
       <navigation-case>
          <from-action>#{userAction.createUser}</from-action>
          <if>#{true}</if>
@@ -33,23 +34,53 @@
    </navigation-rule>
    
    <navigation-rule>
+      <from-view-id>/userdetail.xhtml</from-view-id>
+      
+      <navigation-case>
+         <from-action>#{userAction.save}</from-action>
+         <if>#{true}</if>
+         <to-view-id>/manageusers.xhtml</to-view-id>
+         <redirect />
+      </navigation-case>
+      
+      <navigation-case>
+         <from-action>#{userAction.cancel}</from-action>
+         <if>#{true}</if>
+         <to-view-id>/manageusers.xhtml</to-view-id>
+         <redirect/>
+      </navigation-case>      
+   </navigation-rule>   
+   
+   <navigation-rule>
       <from-view-id>/managegroups.xhtml</from-view-id>
+      
       <navigation-case>
+         <from-action>#{groupAction.createGroup}</from-action>
+         <if>#{true}</if>
+         <to-view-id>/groupdetail.xhtml</to-view-id>
+         <redirect/>
+      </navigation-case>
+      
+      <navigation-case>
          <from-action>#{groupAction.deleteGroup(group.name, group.groupType)}</from-action>
          <if>#{true}</if>
          <to-view-id>/managegroups.xhtml</to-view-id>
          <redirect />
       </navigation-case>
+      
    </navigation-rule>
    
    <navigation-rule>
-      <from-view-id>/userdetail.xhtml</from-view-id>
+      <from-view-id>/groupdetail.xhtml</from-view-id>
+      
       <navigation-case>
-         <from-action>#{userAction.save}</from-action>
+         <from-action>#{groupAction.cancel}</from-action>
          <if>#{true}</if>
-         <to-view-id>/manageusers.xhtml</to-view-id>
-         <redirect />
+         <to-view-id>/managegroups.xhtml</to-view-id>
+         <redirect/>
       </navigation-case>
+      
    </navigation-rule>
 
+
 </faces-config>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/groupdetail.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/groupdetail.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/groupdetail.xhtml	2010-07-20 11:17:07 UTC (rev 13450)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+   xmlns:ui="http://java.sun.com/jsf/facelets"
+   xmlns:f="http://java.sun.com/jsf/core"
+   xmlns:h="http://java.sun.com/jsf/html"
+   template="/WEB-INF/templates/default.xhtml">
+   
+  <ui:define name="sidebar"> 
+    <ui:include src="menu.xhtml"/>
+  </ui:define>   
+   
+   <ui:define name="content">
+        
+      <div id="contentMain">
+
+  	    <h2>Group Details</h2>  
+  	    
+  	    <h:messages globalOnly="true"/>
+  	    
+  	    <h:form id="group">
+  	    
+          <div class="formRow">
+            <h:outputLabel for="groupname" value="Group name" styleClass="formLabel"/>
+            <h:inputText id="groupname" value="#{groupAction.groupName}"/>
+            <div class="validationError"><h:message for="firstname"/></div>
+          </div>  
+          
+          <div class="formButtons">
+            <h:commandButton id="save" value="Save" action="#{groupAction.save}" styleClass="formButton"/>
+            <h:commandButton id="cancel" value="Cancel" action="#{groupAction.cancel}" styleClass="formButton"/>
+          </div>
+    
+          <br class="clear"/>
+  	    
+  	    </h:form>
+
+	    </div>
+	    
+   </ui:define>
+    
+</ui:composition>
+

Modified: modules/security/trunk/examples/idmconsole/src/main/webapp/userdetail.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/userdetail.xhtml	2010-07-20 10:52:06 UTC (rev 13449)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/userdetail.xhtml	2010-07-20 11:17:07 UTC (rev 13450)
@@ -63,7 +63,7 @@
                                       
           <div class="formButtons">
             <h:commandButton id="save" value="Save" action="#{userAction.save}" styleClass="formButton"/>
-            <h:commandButton id="cancel" view="/usermanager.xhtml" value="Cancel" styleClass="formButton"/>
+            <h:commandButton id="cancel" value="Cancel" action="#{userAction.cancel}" styleClass="formButton"/>
           </div>
     
           <br class="clear"/>

Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/action/GroupAction.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/action/GroupAction.java	2010-07-20 10:52:06 UTC (rev 13449)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/action/GroupAction.java	2010-07-20 11:17:07 UTC (rev 13450)
@@ -1,6 +1,7 @@
 package org.jboss.seam.security.management.action;
 
 import java.io.Serializable;
+import java.util.List;
 
 import javax.enterprise.context.Conversation;
 import javax.enterprise.context.ConversationScoped;
@@ -46,4 +47,34 @@
       conversation.end();      
       return "success";
    }
+   
+   public void cancel()
+   {
+      conversation.end();
+   }
+   
+   public String getGroupName()
+   {
+      return groupName;
+   }
+   
+   public void setGroupName(String groupName)
+   {
+      this.groupName = groupName;
+   }
+   
+   public String getGroupType()
+   {
+      return groupType;
+   }
+   
+   public void setGroupType(String groupType)
+   {
+      this.groupType = groupType;
+   }
+   
+   public List<String> getSupportedGroupTypes()
+   {
+      return null;
+   }
 }

Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/action/UserAction.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/action/UserAction.java	2010-07-20 10:52:06 UTC (rev 13449)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/action/UserAction.java	2010-07-20 11:17:07 UTC (rev 13450)
@@ -69,6 +69,11 @@
       }
    }
    
+   public void cancel()
+   {
+      conversation.end();
+   }
+   
    private String saveNewUser()
    {
       if (password == null || !password.equals(confirm))

Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/IdentitySessionProducer.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/IdentitySessionProducer.java	2010-07-20 10:52:06 UTC (rev 13449)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/IdentitySessionProducer.java	2010-07-20 11:17:07 UTC (rev 13450)
@@ -26,6 +26,7 @@
 import org.picketlink.idm.impl.configuration.metadata.IdentityStoreConfigurationMetaDataImpl;
 import org.picketlink.idm.impl.configuration.metadata.IdentityStoreMappingMetaDataImpl;
 import org.picketlink.idm.impl.configuration.metadata.RealmConfigurationMetaDataImpl;
+import org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository;
 import org.picketlink.idm.spi.configuration.metadata.IdentityRepositoryConfigurationMetaData;
 import org.picketlink.idm.spi.configuration.metadata.IdentityStoreConfigurationMetaData;
 import org.picketlink.idm.spi.configuration.metadata.IdentityStoreMappingMetaData;
@@ -90,7 +91,7 @@
       List<IdentityRepositoryConfigurationMetaData> repositories = new ArrayList<IdentityRepositoryConfigurationMetaData>();
       
       IdentityRepositoryConfigurationMetaDataImpl repository = new IdentityRepositoryConfigurationMetaDataImpl();
-      repository.setClassName("org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository");
+      repository.setClassName(WrapperIdentityStoreRepository.class.getName());
       repository.setDefaultAttributeStoreId(defaultAttributeStoreId != null ? defaultAttributeStoreId : defaultStoreId);
       repository.setDefaultIdentityStoreId(defaultIdentityStoreId != null ? defaultIdentityStoreId : defaultStoreId);
       



More information about the seam-commits mailing list