struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Troy Bull <troy.b...@uni.edu>
Subject Re: trouble with dispatching on a paramter
Date Tue, 18 Oct 2005 16:51:01 GMT
Thank you so much, as soon as I removed the execute method it worked 
perfectly

Wendy Smoak wrote:

> From: "Troy Bull" <troy.bull@uni.edu>
>
>>  public ActionForward execute( ... )  {
>>    SearchForm s = (SearchForm) form;
>>    String dispatchString = s.getDispatch();
>>    System.out.println("Main Dispatch String : " + dispatchString);
>>    // manually dispatching works but is ugly
>>    //if ("run_main_search".equals(dispatchString)) { return 
>> runMainSearch(mapping, form, request, response);}
>>    //if ("save_defaults".equals(dispatchString)) { return 
>> setAsDefaults(mapping, form, request, response);}
>>    return mapping.findForward("error");
>>  }
>>
>>  public ActionForward runMainSearch(... ) { ... }
>
>
> I still think you're overriding 'execute' and never calling 
> super.execute(...) to give DispatchAction a chance to do its job.
>
> Does it work if you remove the 'execute' method entirely from your 
> DoSearchAction (and fix the 'dispatch' param value so it matches the 
> method name)?
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message