If you have three buttons available and three
functions in your action, say doAdd, doUpdate, and
doDelete, and you want the doAdd function to be the
default (i.e. gets executed when the enter key is
pressed rather than any button being clicked), can't
you just have in the doPerform method:

public void doPerform(RunData data, Context context)
throws Exception
    {
         //Default action
         doAdd(data,context);
    }

I know I've used this in the past. Doesn't the
doPerform function only get executed if no button is
clicked?

-Lou

--- David Demner <[EMAIL PROTECTED]> wrote:
> I'm trying to get around a form submittal problem. 
> I have a very simple
> form (1 text box and 1 submit button named
> eventsubmit_doWhatever) where
> method="post" and
> action="$link.setAction("MyAction")".
>  
> When the user clicks on the button, the submit
> button's name is passed with
> the form data and everything works fine.  When the
> user hits enter the
> button in the form, the submit button's name doesn't
> get passed and the
> doPerform event gets called instead.  This
> effectively breaks the form when
> the enter key is pressed.
>  
> How do other people handle this problem??
>  
> Thanks,
>  
> David
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to