archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <br...@apache.org>
Subject Re: svn commit: r483341 - in /maven/archiva/trunk/archiva-webapp/src/main: java/org/apache/maven/archiva/web/action/SearchAction.java resources/xwork.xml webapp/WEB-INF/jsp/quickSearch.jsp
Date Thu, 07 Dec 2006 04:39:12 GMT
Isn't there a way we can do this with an action message rather than  
creating our own custom strings every time?

- Brett

On 07/12/2006, at 3:08 PM, oching@apache.org wrote:

> Author: oching
> Date: Wed Dec  6 20:08:03 2006
> New Revision: 483341
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=483341
> Log:
> PR: MRM-246
>
> Added display of error messages when an account is locked after 3  
> unsuccessful login attempts.
>
> Modified:
>     maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/ 
> maven/archiva/web/action/SearchAction.java
>     maven/archiva/trunk/archiva-webapp/src/main/resources/xwork.xml
>     maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/ 
> quickSearch.jsp
>
> Modified: maven/archiva/trunk/archiva-webapp/src/main/java/org/ 
> apache/maven/archiva/web/action/SearchAction.java
> URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva- 
> webapp/src/main/java/org/apache/maven/archiva/web/action/ 
> SearchAction.java?view=diff&rev=483341&r1=483340&r2=483341
> ====================================================================== 
> ========
> --- maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/ 
> maven/archiva/web/action/SearchAction.java (original)
> +++ maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/ 
> maven/archiva/web/action/SearchAction.java Wed Dec  6 20:08:03 2006
> @@ -80,6 +80,8 @@
>
>      private static final String ARTIFACT = "artifact";
>
> +    private String infoMessage;
> +
>      public String quickSearch()
>          throws MalformedURLException, RepositoryIndexException,  
> RepositoryIndexSearchException,
>          ConfigurationStoreException, ParseException
> @@ -184,5 +186,15 @@
>      public Collection getSearchResults()
>      {
>          return searchResults;
> +    }
> +
> +    public String getInfoMessage()
> +    {
> +        return infoMessage;
> +    }
> +
> +    public void setInfoMessage( String infoMessage )
> +    {
> +        this.infoMessage = infoMessage;
>      }
>  }
>
> Modified: maven/archiva/trunk/archiva-webapp/src/main/resources/ 
> xwork.xml
> URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva- 
> webapp/src/main/resources/xwork.xml? 
> view=diff&rev=483341&r1=483340&r2=483341
> ====================================================================== 
> ========
> --- maven/archiva/trunk/archiva-webapp/src/main/resources/xwork.xml  
> (original)
> +++ maven/archiva/trunk/archiva-webapp/src/main/resources/xwork.xml  
> Wed Dec  6 20:08:03 2006
> @@ -76,7 +76,10 @@
>        <!-- The following security-* result names arrive from the  
> plexus-security package -->
>        <result name="security-login-success" type="redirect- 
> action">index</result>
>        <result name="security-login-cancel" type="redirect- 
> action">index</result>
> -      <result name="security-login-locked" type="redirect- 
> action">index</result>
> +      <result name="security-login-locked" type="redirect-action">
> +        <param name="infoMessage">Account Locked</param>
> +        <param name="actionName">index</param>
> +      </result>
>        <result name="security-logout" type="redirect-action">index</ 
> result>
>        <result name="requires-authentication" type="redirect-action">
>          <param name="actionName">login</param>
>
> Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB- 
> INF/jsp/quickSearch.jsp
> URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva- 
> webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp? 
> view=diff&rev=483341&r1=483340&r2=483341
> ====================================================================== 
> ========
> --- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/ 
> quickSearch.jsp (original)
> +++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/ 
> quickSearch.jsp Wed Dec  6 20:08:03 2006
> @@ -21,6 +21,10 @@
>    <ww:head />
>  </head>
>
> +<ww:if test="%{infoMessage != null}">
> +   <p>${infoMessage}</p>
> +</ww:if>
> +
>  <body>
>
>  <h1>Search</h1>
>

Mime
View raw message