continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r441148 - in /maven/continuum/branches/continuum-acegi/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ java/org/apache/maven/continuum/web/view/ webapp/
Date Thu, 07 Sep 2006 17:34:57 GMT
Author: carlos
Date: Thu Sep  7 10:34:56 2006
New Revision: 441148

URL: http://svn.apache.org/viewvc?view=rev&rev=441148
Log:
More work on ProjectGroup permissions page

Added:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/ProjectGroupPermissionsCell.java
  (with props)
Modified:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupPermissions.jsp

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java?view=diff&rev=441148&r1=441147&r2=441148
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java
Thu Sep  7 10:34:56 2006
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.ContinuumException;
 
 import org.apache.maven.user.model.UserManager;
@@ -42,18 +42,20 @@
      */
     private UserManager userManager;
 
-    private Project project;
+    private ProjectGroup projectGroup;
 
-    private int projectId;
+    private int projectGroupId;
 
-    private Map users;
+    private List users;
 
     public String execute()
         throws ContinuumException
     {
         users = userManager.getUsersInstancePermissions();
 
-        project = getProject( projectId );
+        projectGroup = getContinuum().getProjectGroup( projectGroupId );
+        
+        getLogger().info("ProjectGroupName = " + projectGroup.getName() );
 
         return INPUT;
     }
@@ -61,26 +63,21 @@
     public String save()
         throws ContinuumException
     {
-        return SUCCESS;
+       return SUCCESS;
+ 
     }
 
-    private Project getProject( int projectId )
-        throws ContinuumException
-    {
-        return getContinuum().getProject( projectId );
-    }
-
-    public int getProjectId()
+    public int getProjectGroupId()
     {
-        return projectId;
+        return projectGroupId;
     }
 
-    public void setProjectId( int projectId )
+    public void setProjectGroupId( int projectGroupId )
     {
-        this.projectId = projectId;
+        this.projectGroupId = projectGroupId;
     }
 
-    public Map getUsers()
+    public List getUsers()
     {
         return users;
     }

Added: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/ProjectGroupPermissionsCell.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/ProjectGroupPermissionsCell.java?view=auto&rev=441148
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/ProjectGroupPermissionsCell.java
(added)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/ProjectGroupPermissionsCell.java
Thu Sep  7 10:34:56 2006
@@ -0,0 +1,31 @@
+package org.apache.maven.continuum.web.view;
+
+import org.extremecomponents.table.bean.Column;
+import org.extremecomponents.table.cell.DisplayCell;
+import org.extremecomponents.table.core.TableModel;
+import org.extremecomponents.table.cell.Cell;
+import org.extremecomponents.table.view.html.ColumnBuilder;
+
+public class ProjectGroupPermissionsCell implements Cell
+{
+        public String getExportDisplay(TableModel model, Column column) {
+            return null;
+        }
+
+        public String getHtmlDisplay(TableModel model, Column column) {
+            ColumnBuilder columnBuilder = new ColumnBuilder(column);
+            
+            columnBuilder.tdStart();
+            
+            try {
+                columnBuilder.getHtmlBuilder().input("checkbox");
+                columnBuilder.getHtmlBuilder().checked();
+                columnBuilder.getHtmlBuilder().xclose();
+            } catch (Exception e) {}
+            
+            columnBuilder.tdEnd();
+            
+            return columnBuilder.toString();
+        }
+
+}

Propchange: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/ProjectGroupPermissionsCell.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/ProjectGroupPermissionsCell.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupPermissions.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupPermissions.jsp?view=diff&rev=441148&r1=441147&r2=441148
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupPermissions.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupPermissions.jsp
Thu Sep  7 10:34:56 2006
@@ -2,54 +2,41 @@
 <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
 <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %>
 <%@ taglib uri="continuum" prefix="c1" %>
-
+ 
 <html>
   <ww:i18n name="localization.Continuum">
     <head>
       <title><ww:text name="projectView.page.title"/></title>
     </head>
-
+ 
     <body>
       <div id="h3">
-
+ 
         <jsp:include page="/navigations/ProjectGroupMenu.jsp">
           <jsp:param name="tab" value="permissions"/>
         </jsp:include>
-
+ 
         <h3>Users</h3>
-
-        <ec:table items="users"
-                  var="user"
-                  showExports="false"
-                  showPagination="false"
-                  showStatusBar="false"
-                  filterable="false">
-          <ec:row highlightRow="true">
-            <ec:column property="username" title="User Name" width="48%">
-            </ec:column>
-            <ec:column property="view" title="View" width="1%" sortable="false">
-              <center>
-                <ww:checkbox label="" name="viewPermission" value="${pageScope.user.view}"
fieldValue="true"/>
-              </center>
-            </ec:column>
-            <ec:column property="edit" title="Edit" width="1%" sortable="false">
-              <center>
-                <ww:checkbox label="" name="editPermission" value="${pageScope.user.edit}"
fieldValue="true"/>
-              </center>
-            </ec:column>
-            <ec:column property="delete" title="Delete" width="1%" sortable="false">
-              <center>
-                <ww:checkbox label="" name="deletePermission" value="${pageScope.user.delete}"
fieldValue="true"/>
-              </center>
-            </ec:column>
-            <ec:column property="build" title="Build" width="1%" sortable="false">
-              <center>
-                <ww:checkbox label="" name="buildPermission" value="${pageScope.user.build}"
fieldValue="true"/>
-              </center>
-            </ec:column>
-          </ec:row>
-        </ec:table>
-
+ 
+        <ww:form id="myForm" action="projectGroupPermissions!save.action" method="post">
+          <ec:table items="users" 
+                    showExports="false"
+                    showPagination="false"
+                    showStatusBar="false"
+                    filterable="false"
+                    action="projectGroupPermissions!save.action"
+                    form="myForm">
+            <ec:row highlightRow="true">
+              <ec:column property="user.username" title="User Name" width="48%" />
+              <ec:column property="view" title="View" width="1%" sortable="false" cell="org.apache.maven.continuum.web.view.ProjectGroupPermissionsCell"
/>
+              <ec:column property="edit" title="Edit" width="1%" sortable="false" cell="org.apache.maven.continuum.web.view.ProjectGroupPermissionsCell"
/>
+              <ec:column property="delete" title="Delete" width="1%" sortable="false"
cell="org.apache.maven.continuum.web.view.ProjectGroupPermissionsCell" />
+              <ec:column property="build" title="Build" width="1%" sortable="false" cell="org.apache.maven.continuum.web.view.ProjectGroupPermissionsCell"
/>
+            </ec:row>
+          </ec:table>
+          <ww:submit value="Save"/>
+        </ww:form>
+      </div>
     </body> 
   </ww:i18n>
-</html>
+</html>
\ No newline at end of file



Mime
View raw message