When you submit a form using struts framework. Every param+value pair is saved into your ActionForm. Param is the name of your ActionForm's member variable. If the widget is a button and you want to read the value, either use request.getAttribute("myButton") or use ActionForm.getMyButton.
-----Original Message----- From: Denis Avdic [mailto:[EMAIL PROTECTED] Sent: May 28, 2003 2:39 PM To: Struts Users Mailing List Subject: Re: [RANT/FLAME] Re: Submit Value Why wouldn't there be a member variable? In the form? <html:submit property="submitButtonName" value="WhateverValueIWantInHere"> submit is there just because i put property="submit". I could have called it property="yellowdinosaurwithpurplepolkadots" and it would still work (i think, never tried a name that long). I am really confused by what you are saying here... Phillip Qin wrote: >Because there is no member variable to store the value of submit button. >Plus you cannot guarantee request.getParameter("submit") returning value for >some browsers. > >-----Original Message----- >From: Denis Avdic [mailto:[EMAIL PROTECTED] >Sent: May 28, 2003 2:23 PM >To: Struts Users Mailing List >Subject: Re: [RANT/FLAME] Re: Submit Value > >Actually, I just tried taking the value from request and it works. > >If I do request.getParameter("submit"); it returns value, but if i go >myForm.getSubmit(); it does not. > >Weird. Only IE I can test right now is whatever comes with XP. > >Anyone have any other experiences with this? > >Denis > > >Erik Price wrote: > > > >>Denis Avdic wrote: >> >> >> >>>*&*$*& damn MICROSOFT! >>> >>>And me for not testing on IE. >>> >>>Now I have to redesign half my webapp! >>> >>>And why is this implemented if IE (90% of population out there) >>>cannot use the feature? >>> >>></rant> >>></flame> >>> >>>Gah. Now to figure out an elegant way of fixing this.... >>> >>> >>Maybe you could have JavaScript that detects which button was clicked >>and changes the value of a hidden form field just before the >>submission occurs? >> >>Kind of inelegant, but it might work. It's only as reliable as >>JavaScript, though. >> >>Good luck, that sucks if you have to re-do work. >> >> >> >>Erik >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]