You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by jm...@apache.org on 2006/08/30 22:51:00 UTC
svn commit: r438619 - in /maven/continuum/trunk/continuum-webapp/src/main:
java/org/apache/maven/continuum/web/action/ resources/ webapp/
Author: jmcconnell
Date: Wed Aug 30 13:50:59 2006
New Revision: 438619
URL: http://svn.apache.org/viewvc?rev=438619&view=rev
Log:
added confirm step to project group removal
Added:
maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmGroupRemoval.jsp (with props)
Modified:
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
maven/continuum/trunk/continuum-webapp/src/main/webapp/groupSummary.jsp
maven/continuum/trunk/continuum-webapp/src/main/webapp/projectGroupSummary.jsp
Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java?rev=438619&r1=438618&r2=438619&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java Wed Aug 30 13:50:59 2006
@@ -31,6 +31,8 @@
extends PlexusActionSupport
implements Preparable
{
+ public static final String CONFIRM = "confirm";
+
/**
* @plexus.requirement
*/
Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=438619&r1=438618&r2=438619&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java Wed Aug 30 13:50:59 2006
@@ -39,63 +39,57 @@
private boolean confirmed;
public String summary()
+ throws ContinuumException
{
- try
- {
- projectGroup = getContinuum().getProjectGroup( projectGroupId );
- }
- catch ( ContinuumException e)
- {
- addActionError( "unable to retrieve project group" );
- return ERROR;
- }
+ projectGroup = getContinuum().getProjectGroup( projectGroupId );
return SUCCESS;
}
public String members()
+ throws ContinuumException
{
return summary();
}
public String buildDefinitions()
+ throws ContinuumException
{
return summary();
}
public String notifiers()
+ throws ContinuumException
+ {
+ return summary();
+ }
+
+ public String confirm()
+ throws ContinuumException
{
return summary();
}
public String remove()
+ throws ContinuumException
{
//todo add confirm page like removing build definition
- try
+ if ( confirmed )
{
getContinuum().removeProjectGroup( projectGroupId );
}
- catch ( ContinuumException e )
+ else
{
- addActionError( "unable to remove project group" );
- return ERROR;
+ return CONFIRM;
}
return SUCCESS;
}
public String build()
+ throws ContinuumException
{
- try
- {
- getContinuum().buildProjectGroup( projectGroupId );
- }
- catch ( ContinuumException e )
- {
- addActionError( "unable to initiate build of project group" );
- getLogger().warn( "unable to initiate build of project group " + projectGroupId );
- return ERROR;
- }
+ getContinuum().buildProjectGroup( projectGroupId );
return SUCCESS;
}
Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?rev=438619&r1=438618&r2=438619&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Wed Aug 30 13:50:59 2006
@@ -202,7 +202,12 @@
</action>
<action name="removeProjectGroup" class="projectGroup" method="remove">
+ <result name="confirm" type="chain">confirmGroupRemoval</result>
<result name="success" type="chain">groupSummary</result>
+ </action>
+
+ <action name="confirmGroupRemoval" class="projectGroup" method="confirm">
+ <result name="success">confirmGroupRemoval.jsp</result>
</action>
<!--
Added: maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmGroupRemoval.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmGroupRemoval.jsp?rev=438619&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmGroupRemoval.jsp (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmGroupRemoval.jsp Wed Aug 30 13:50:59 2006
@@ -0,0 +1,29 @@
+<%@ taglib uri="/webwork" prefix="ww" %>
+<%@ taglib uri="continuum" prefix="c1" %>
+<html>
+ <ww:i18n name="localization.Continuum">
+ <head>
+ <title>Project Group Removal</title>
+ </head>
+ <body>
+ <div id="axial" class="h3">
+ <h3>Project Group Removal</h3>
+ <div class="axial">
+ <ww:form action="removeProjectGroup" method="post">
+ <ww:hidden name="projectGroupId"/>
+ <ww:hidden name="confirmed" value="true"/>
+ <ww:actionerror/>
+
+ <p>
+ Are you sure you wish to remove <ww:property value="projectGroup.name"/>?
+ </p>
+
+ <div class="functnbar3">
+ <c1:submitcancel value="%{getText('delete')}" cancel="%{getText('cancel')}"/>
+ </div>
+ </ww:form>
+ </div>
+ </div>
+ </body>
+ </ww:i18n>
+</html>
Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmGroupRemoval.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/groupSummary.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/groupSummary.jsp?rev=438619&r1=438618&r2=438619&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/groupSummary.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/groupSummary.jsp Wed Aug 30 13:50:59 2006
@@ -1,6 +1,7 @@
<%@ taglib uri="/webwork" prefix="ww" %>
<%@ 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>
@@ -25,7 +26,8 @@
<ww:param name="projectGroupId" value="%{'${group.id}'}"/>
</ww:url>
- <table border="2" cellspacing="2" cellpadding="3" width="100%">
+ <div class="body">
+ <table border="2" cellspacing="2" cellpadding="3" width="100%">
<tr>
<td>Name:</td>
<td><ww:a href="%{projectGroupSummaryUrl}">${group.name}</ww:a></td>
@@ -75,6 +77,7 @@
</table>
<hr/>
<p/>
+ </div>
</c:forEach>
</div>
</body>
Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/projectGroupSummary.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/projectGroupSummary.jsp?rev=438619&r1=438618&r2=438619&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/projectGroupSummary.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/projectGroupSummary.jsp Wed Aug 30 13:50:59 2006
@@ -47,7 +47,7 @@
<ww:param name="projectGroupId" value="projectGroupId"/>
</ww:url>
<ww:url id="removeProjectGroupUrl" action="removeProjectGroup">
- <ww:param name="projectGroupId" value="projectGroupId"/>
+ <ww:param name="projectGroupId" value="projectGroupId"/>
<ww:param name="confirmed" value="false"/>
</ww:url>
<ww:a href="%{buildProjectGroupUrl}">Build</ww:a> <ww:a href="%{removeProjectGroupUrl}">Remove</ww:a>