i have the foll method....
public List getSearchResults(MatterSearchBean oSearchBean)
throws LawPackException {
SearchResults srchRstBean = new SearchResults();
-----------------------------------------------
i have stmts here for connecting to the database
gets the connection
executes the query
returns the result set and then i do the following...
----------------------------------------------
if(resultSet != null) {
while(resultSet.next()){
String matterIdVal = resultSet.getString (LawPackConstants.COLUMN_MATTER_ID);
String matterNameVal = resultSet.getString(LawPackConstants.COLUMN_MATTER_NAME);
searchResults.add(searchMatterString.toString());
srchRstBean.setMatterId(matterIdVal);
srchRstBean.setMatterName(matterNameVal);
}//if
}//while
return searchResults;
}
now in my actionform i have:
List l_results = genMatterSearchDAO.getSearchResults(oSearchBean);
l_pageForm.setSearchResults(l_results);
request.setAttribute("hSearchList",l_results);
and then in my
jsp i have....
<bean
efine id="HSearchList" name="Matter_Search_Bean" property="HSearchList" scope="request" />
<logic:iterate id="currentResult" name = "HSearchList" >
<tr class='off'>
<td nowrap>
<a href="javascript
penLink('<bean:write name="currentResult" property="matterId"/>','_blank');" >
<bean:write name="currentResult" property="matterId"/>
</a>
</td>
<td nowrap><bean:write name="currentResult" property="matterName"/></td>
<td nowrap><bean:write name="currentResult" property="personInChargeList"/></td>
<td nowrap><bean:write name="currentResult" property="businessUnitList"/></td>
</tr>
</logic:iterate>
This code is returning me only the last row in the resultset...
it has to return all the rows
i thnik i am doing wrong in the place where i am getting the resultset and putting it in searchresults...
any pointers/help?
thankyou