continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r448542 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ resources/ webapp/ webapp/navigations/
Date Thu, 21 Sep 2006 13:03:20 GMT
Author: evenisse
Date: Thu Sep 21 06:03:19 2006
New Revision: 448542

URL: http://svn.apache.org/viewvc?view=rev&rev=448542
Log:
[CONTINUUM-755] Add field validations
Submitted by: Maria Odea Ching

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/addProject.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/buildDefinitionEdit.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/editSchedule.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/Menu.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/user.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroup.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java?view=diff&rev=448542&r1=448541&r2=448542
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
Thu Sep 21 06:03:19 2006
@@ -45,7 +45,7 @@
 
     private String projectType;
 
-    public String execute()
+    public String add()
         throws ContinuumException
     {
         Project project = new Project();
@@ -67,9 +67,9 @@
         return SUCCESS;
     }
 
-    public String doDefault()
+    public String input()
     {
-        return INPUT;
+        return SUCCESS;
     }
 
     public String getProjectName()

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java?view=diff&rev=448542&r1=448541&r2=448542
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
Thu Sep 21 06:03:19 2006
@@ -121,7 +121,7 @@
             defaultBuildDefinition = buildDefinition.isDefaultForProject();
         }
 
-        return INPUT;
+        return SUCCESS;
     }
 
     public String saveToProject()

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java?view=diff&rev=448542&r1=448541&r2=448542
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
Thu Sep 21 06:03:19 2006
@@ -84,7 +84,15 @@
                 dayOfMonth = cronEx[3];
                 month = cronEx[4];
                 dayOfWeek = cronEx[5];
-                year = cronEx[6];
+
+                try
+                {
+                    year = cronEx[6];
+                }
+                catch ( Exception xe )
+                {
+
+                }
 
                 description = schedule.getDescription();
                 name = schedule.getName();

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?view=diff&rev=448542&r1=448541&r2=448542
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Thu Sep 21 06:03:19
2006
@@ -72,7 +72,11 @@
       <result name="success" type="chain">groupSummary</result>
     </action>
 
-    <action name="addProject" class="addProject">
+    <action name="addProjectInput" class="addProject" method="input">
+      <result name="success">addProject.jsp</result>
+    </action>
+
+    <action name="addProject" class="addProject" method="add">
       <result name="input">addProject.jsp</result>
       <result name="success" type="chain">groupSummary</result>
     </action>
@@ -125,6 +129,7 @@
     </action>
 
     <action name="saveUser" class="userManagement" method="save">
+      <result name="input">user.jsp</result>
       <result name="success" type="chain">users</result>
     </action>
 
@@ -145,6 +150,7 @@
     </action>
 
     <action name="saveUserGroup" class="userGroupManagement" method="save">
+      <result name="input">userGroup.jsp</result>
       <result name="success" type="chain">userGroups</result>
     </action>
 
@@ -156,11 +162,12 @@
     <!--
     * build definition actions
     -->
-    <action name="buildDefinition" class="buildDefinition">
-      <result name="input">buildDefinitionEdit.jsp</result>
+    <action name="buildDefinition" class="buildDefinition" method="input">
+      <result name="success">buildDefinitionEdit.jsp</result>
     </action>
 
     <action name="saveProjectBuildDefinition" class="buildDefinition" method="saveToProject">
+      <result name="input">buildDefinitionEdit.jsp</result>
       <result name="success" type="chain">projectView</result>
     </action>
 
@@ -287,6 +294,7 @@
     </action>
 
     <action name="saveSchedule" class="schedule" method="save">
+      <result name="input">editSchedule.jsp</result>
       <result name="success" type="chain">schedules</result>
     </action>
 

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/addProject.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/addProject.jsp?view=diff&rev=448542&r1=448541&r2=448542
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/addProject.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/addProject.jsp Thu Sep 21 06:03:19
2006
@@ -24,17 +24,17 @@
                     </ww:else>
                 </h3>
                 <div class="axial">
-                    <ww:form method="post" action="addProject.action">
+                    <ww:form method="post" action="addProject" validate="true">
                         <input type="hidden" name="projectType" value="<ww:property
value="projectType"/>">
                         <table>
                           <tbody>
-                            <ww:textfield label="%{getText('projectName.label')}" name="projectName">
+                            <ww:textfield label="%{getText('projectName.label')}" name="projectName"
required="true">
                                 <ww:param name="desc"><p><ww:text name="projectName.message"/></p></ww:param>
                             </ww:textfield>
-                            <ww:textfield label="%{getText('projectVersion.label')}" name="projectVersion">
+                            <ww:textfield label="%{getText('projectVersion.label')}" name="projectVersion"
required="true">
                                 <ww:param name="desc"><p><ww:text name="projectVersion.message"/></p></ww:param>
                             </ww:textfield>
-                            <ww:textfield label="%{getText('projectScmUrl.label')}" name="projectScmUrl">
+                            <ww:textfield label="%{getText('projectScmUrl.label')}" name="projectScmUrl"
required="true">
                                 <ww:param name="desc"><p><ww:text name="projectScmUrl.message"/></p></ww:param>
                             </ww:textfield>
                             <ww:textfield label="%{getText('projectScmUsername.label')}"
name="projectScmUsername">

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/buildDefinitionEdit.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/buildDefinitionEdit.jsp?view=diff&rev=448542&r1=448541&r2=448542
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/buildDefinitionEdit.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/buildDefinitionEdit.jsp Thu Sep
21 06:03:19 2006
@@ -23,7 +23,7 @@
 
 
 
-          <ww:form action="%{actionUrl}" method="post" >
+          <ww:form action="%{actionUrl}" method="post" validate="true">
 
             <ww:hidden name="buildDefinitionId"/>
             <ww:hidden name="projectId"/>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/editSchedule.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/editSchedule.jsp?view=diff&rev=448542&r1=448541&r2=448542
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/editSchedule.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/editSchedule.jsp Thu Sep 21 06:03:19
2006
@@ -11,7 +11,7 @@
     <h3><ww:text name="editSchedule.page.title"/></h3>
 
     <div class="axial">
-      <ww:form action="saveSchedule" method="post">
+      <ww:form action="saveSchedule" method="post" validate="true">
         <ww:hidden name="id"/>
           <table>
             <ww:textfield label="%{getText('schedule.name.label')}" name="name" required="true">
@@ -22,7 +22,7 @@
             </ww:textfield>
 
             <tr>
-              <th><ww:label theme="simple" value="%{getText('schedule.cronExpression.label')}:"
required="true"/></th>
+              <th><ww:label theme="simple" value="%{getText('schedule.cronExpression.label')}:"/></th>
               <td>
                 <table>
                   <ww:textfield label="%{getText('schedule.second.label')}" name="second"
size="2"/>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/Menu.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/Menu.jsp?view=diff&rev=448542&r1=448541&r2=448542
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/Menu.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/Menu.jsp Thu Sep 21
06:03:19 2006
@@ -25,10 +25,10 @@
         <a href="<ww:url value="addMavenOneProject!default.action"/>"><ww:text
name="menu.add.m1Project"/></a>
       </div>
       <div class="body">
-        <a href="<ww:url value="addProject!default.action"><ww:param name="projectType">ant</ww:param></ww:url>"><ww:text
name="menu.add.antProject"/></a>
+        <a href="<ww:url value="addProjectInput.action"><ww:param name="projectType">ant</ww:param></ww:url>"><ww:text
name="menu.add.antProject"/></a>
       </div>
       <div class="body">
-        <a href="<ww:url value="addProject!default.action"><ww:param name="projectType">shell</ww:param></ww:url>"><ww:text
name="menu.add.shellProject"/></a>
+        <a href="<ww:url value="addProjectInput.action"><ww:param name="projectType">shell</ww:param></ww:url>"><ww:text
name="menu.add.shellProject"/></a>
       </div>
     </div>
   </div>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/user.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/user.jsp?view=diff&rev=448542&r1=448541&r2=448542
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/user.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/user.jsp Thu Sep 21 06:03:19 2006
@@ -13,16 +13,21 @@
 
     <h3><ww:text name="Users"/></h3>
 
-    <ww:form action="saveUser" method="post">
+    <ww:form action="saveUser" method="post" validate="true">
       <ww:hidden name="userId"/>
 
+      <h3>Action Error</h3>
+      <p>
+        <ww:actionerror/>
+      </p>
+
       <div class="axial">
         <table border="1" cellspacing="2" cellpadding="3" width="100%">
-          <ww:textfield label="Username" name="username"/>
-          <ww:textfield label="Full Name" name="fullName"/>
+          <ww:textfield label="Username" name="username" required="true"/>
+          <ww:textfield label="Full Name" name="fullName" required="true"/>
           <ww:textfield label="Email" name="email"/>
-          <ww:password label="Password" name="password"/>
-          <ww:password label="Password(again)" name="passwordTwo"/>
+          <ww:password label="Password" name="password" required="true"/>
+          <ww:password label="Password(again)" name="passwordTwo" required="true"/>
           <ww:select list="userGroups" label="User Group" name="userGroupId"/>
         </table>
       </div>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroup.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroup.jsp?view=diff&rev=448542&r1=448541&r2=448542
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroup.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroup.jsp Thu Sep 21 06:03:19
2006
@@ -13,12 +13,12 @@
 
     <h3><ww:text name="User Group"/></h3>
 
-    <ww:form action="saveUserGroup" method="post">
+    <ww:form action="saveUserGroup" method="post" validate="true">
       <ww:hidden name="userGroupId"/>
 
       <div class="axial">
         <table border="1" cellspacing="2" cellpadding="3" width="100%">
-          <ww:textfield label="Name" name="name"/>
+          <ww:textfield label="Name" name="name" required="true"/>
           <ww:textfield label="Description" name="description"/>
         </table>
       </div>



Mime
View raw message