From d0304eb8a267483f0bf778e5008c68582ade8599 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Mon, 10 Jul 2006 07:01:58 +0000 Subject: [PATCH] add in basic validation git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@420447 13f79535-47bb-0310-9956-ffa450edef68 --- .../manager/web/action/QuickSearchAction.java | 7 ++++- .../action/QuickSearchAction-validation.xml | 26 +++++++++++++++++ .../src/main/resources/validators.xml | 29 ------------------- .../src/main/resources/xwork.xml | 17 ++++------- .../main/webapp/WEB-INF/jsp/quickSearch.jsp | 9 ++++-- .../src/main/webapp/css/site.css | 5 ++++ 6 files changed, 49 insertions(+), 44 deletions(-) create mode 100644 maven-repository-webapp/src/main/resources/org/apache/maven/repository/manager/web/action/QuickSearchAction-validation.xml delete mode 100644 maven-repository-webapp/src/main/resources/validators.xml diff --git a/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/QuickSearchAction.java b/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/QuickSearchAction.java index 78311e99a..68fe27b8e 100644 --- a/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/QuickSearchAction.java +++ b/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/QuickSearchAction.java @@ -95,10 +95,15 @@ public class QuickSearchAction } else { - return ERROR; + return INPUT; } } + public String doInput() + { + return SUCCESS; + } + public String getQ() { return q; diff --git a/maven-repository-webapp/src/main/resources/org/apache/maven/repository/manager/web/action/QuickSearchAction-validation.xml b/maven-repository-webapp/src/main/resources/org/apache/maven/repository/manager/web/action/QuickSearchAction-validation.xml new file mode 100644 index 000000000..961cb7c8d --- /dev/null +++ b/maven-repository-webapp/src/main/resources/org/apache/maven/repository/manager/web/action/QuickSearchAction-validation.xml @@ -0,0 +1,26 @@ + + + + + + + + You must enter some search terms. + + + \ No newline at end of file diff --git a/maven-repository-webapp/src/main/resources/validators.xml b/maven-repository-webapp/src/main/resources/validators.xml deleted file mode 100644 index e06880dfa..000000000 --- a/maven-repository-webapp/src/main/resources/validators.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/maven-repository-webapp/src/main/resources/xwork.xml b/maven-repository-webapp/src/main/resources/xwork.xml index 357f08abe..813ecda2b 100644 --- a/maven-repository-webapp/src/main/resources/xwork.xml +++ b/maven-repository-webapp/src/main/resources/xwork.xml @@ -26,23 +26,18 @@ - + /WEB-INF/jsp/quickSearch.jsp + + /WEB-INF/jsp/quickSearch.jsp /WEB-INF/jsp/results.jsp - /WEB-INF/jsp/index.jsp + - - - + diff --git a/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp b/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp index b23a7a4c4..6b800b9da 100644 --- a/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp +++ b/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp @@ -16,7 +16,10 @@ --%> -Quick Search + + Quick Search + + @@ -24,8 +27,8 @@