The reset button from the search form does not go to the
actionclientaction class. Maybe I have explained it badly.
My jsp has some search fields and the user enters criteria into these
then clicks submit.
This returns a table of results further down the page with checkboxes
associated with each line of result. And a edit or delete link at the
bottom. The user can select multiple checkboxes then edit or delete the
results.
Next to the submit button below the search criteria is a reset button.
How would I blank the search criteria and get rid of the results
displayed below by clicking on reset.
At the moment I have
<td>
<div align="center">
<html:submit value="search"/>
</div>
</td>
<td>
<div align="center">
<html:reset value="reset"/>
</div>
</td>
in my jsp and in my form I have a blank reset method. But this does not
get called.
-----Original Message-----
From: atta-ur rehman [mailto:[EMAIL PROTECTED]
Sent: 30 September 2005 15:30
To: Struts Users Mailing List
Subject: Re: reset form in session scope
in the actionClient action class, on reset button click:
ActionForm form = (ActionForm) session.getAttribute("searchClientForm");
if (form != null) {
form.reset(...);
}
only if I understood your question correctly and search form is not
doing
anything with mapping and/or request in it's reset() method!
ATTA
On 9/30/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a search.jsp which contains two forms search form and a action
> form.
>
> The search form submits all the search criteria to the action class
> which queries the DB then returns a result. The action form then
> decides which action to do with what result.
>
> The problem I have is how do I reset the search form and the action
form
> with one button.
>
> I have two buttons on the search form, submit and reset. When I press
> reset I want to reset the search criteria and clear all the results
> which are being displayed.
>
> My struts config is as follows:
>
> <action path="/searchClient"
> type="com.medina.web.action.SearchClientAction"
> name="searchClientForm"
> scope="session"
> input="/searchClient.jsp"
> validate="true">
> <forward name="success" path="/searchClient.jsp"/>
> </action>
>
> <action path="/actionClient"
> type="com.medina.web.action.ActionClientAction"
> name="actionClientForm"
> scope="request"
> input="/searchClient.jsp"
> validate="true">
> <forward name="edit" path="/editClient.jsp"/>
> <forward name="delete" path="/deleteClient.jsp"/>
> <forward name="failure" path="/searchClient.jsp"/>
> </action>
>
> I have the search form in the seesion scope so when the results are
> validated they are still displayed and do not disappear.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]