I'll solve the execute calling. the problem is the class EventActionDispatcher comes with struts 1.2.9 I am using 1.2.8
Can I solve the problem of 2 buttons with the same name using LookupDispatchAction ? On 3/15/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > On 3/15/06, Ahmed Hashim <[EMAIL PROTECTED]> wrote: > > I'd like to ask about the LookupDispatchAction > > If my action extends from LookupDispatchAction, can I use the execute > method > > In case the user request the Action Directly? not from clicking a > button? > > execute() is always called first. > > > I want the action to do the following: > > 1- Load the page > > 2- When the user click on button X it will execute function X > > 3- When the user click on the button Y it will execute function Y > > 4- When the user click on the button Z it will execute function Z > > > > I have another problem, the button Y,Z have the same value "add" how can > I > > distinguish between them? > > > > Thanks for your help. > > > > On 2/17/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > > > > > Use this one: > http://issues.apache.org/bugzilla/attachment.cgi?id=17485 > > > The related ticket: > > > http://issues.apache.org/bugzilla/show_bug.cgi?id=38343 > > > > > > This class is better, simpler and leaner than LookupDispatchAction. > > > > > > Michael. > > > > > > On 2/16/06, Sun Shine <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I have a page with multiple 'links'. One is an image > > > > button and another is a simple submit button. > > > > > > > > I was using a Dispatch action that maps to each one of > > > > these buttons, using javascript to set the > > > > methodToCall on each of the buttons. worked like a > > > > charm until... > > > > > > > > I was informed I cannot use javascript for page > > > > direction(in case users browser is javascript > > > > disabled.). > > > > > > > > So, the only way I could think of is to wrap the img > > > > and submit button around an href and link to my > > > > dispatch action (e.g. < a href="/MyDispatch.do"/>. > > > > > > > > Now, it seems it's skipping my validation done in the > > > > action form. > > > > > > > > Can anyone tell me what I'm doing wrong OR is there a > > > > better way(I'm sure there is...). how about > > > > LookupDispatchAction? > > Do not use LookupDispatchAction, use EventDispatchAction or even > better, EventActionDispatcher: > http://wiki.apache.org/struts/EventActionDispatcher > > Michael. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://del.icio.us/ahashim