[MRM-1043]

o added row count in search criteria
o cleaned up jsp


git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@744832 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maria Odea B. Ching 2009-02-16 07:31:44 +00:00
parent 87f3147e7e
commit 5f39994250
2 changed files with 32 additions and 58 deletions

View File

@ -170,6 +170,7 @@ public class SearchAction
searchFields.put( "artifactId", "Artifact ID" );
searchFields.put( "version", "Version" );
searchFields.put( "className", "Class/Package Name" );
searchFields.put( "rowCount", "Row Count" );
super.clearErrorsAndMessages();
clearSearchFields();
@ -182,6 +183,7 @@ public class SearchAction
groupId = "";
version = "";
className = "";
rowCount = 30;
currentPage = 0;
}
@ -189,11 +191,6 @@ public class SearchAction
public String filteredSearch()
throws MalformedURLException, RepositoryIndexException, RepositoryIndexSearchException
{
// TODO:
// - repositories must be provided as a select box instead of as a textfield!
// - what about the row count?
// - remove advancedSearch.jsp
if ( ( groupId == null || "".equals( groupId ) ) &&
( artifactId == null || "".equals( artifactId ) ) && ( className == null || "".equals( className ) ) &&
( version == null || "".equals( version ) ) )
@ -210,7 +207,6 @@ public class SearchAction
}
SearchResultLimits limits = new SearchResultLimits( currentPage );
limits.setPageSize( rowCount );
List<String> selectedRepos = new ArrayList<String>();

View File

@ -105,28 +105,6 @@
</td>
</tr>
</table>
<%--
<s:form method="get" action="filteredSearch" validate="true">
<s:textfield label="Row Count" size="50" name="rowCount"/>
<s:textfield label="Group Id" size="50" name="groupId"/>
<s:textfield label="Artifact Id" size="50" name="artifactId"/>
<s:textfield label="Version" size="50" name="version"/>
<s:textfield label="Class / Package" size="50" name="className"/>
<s:select name="repositoryId" label="Repository ID" list="managedRepositoryList"/>
<s:hidden name="completeQueryString" value="%{#attr.completeQueryString}"/>
<s:hidden name="fromFilterSearch" value="%{#attr.fromFilterSearch}"/>
<s:submit label="Go!"/>
</s:form>
<s:url id="indexUrl" action="index"/>
<s:a href="%{indexUrl}">
Quick Search Page
</s:a>
<script type="text/javascript">
document.getElementById("filteredSearch_groupId").focus();
</script>
--%>
</c:if>
<c:if test="${fromFilterSearch == false}">
<s:form method="get" action="quickSearch" validate="true">