This way of getting the values is antiquated, slow, etc.  Again, for
some better ways to do this, look at www.michaelmcgrady.com on
buttons.  These ways are old and no longer best practices.

On 10/10/05, Martin Gainty <[EMAIL PROTECTED]> wrote:
> Antunes
> 3 ways (straight from the doc)
> <html:submit property="property" value="x">
> The parameter names for the request will appear as "property.x"  or
> "PropertyName.GetX()"
>
> /*In the case where property is null */
> <html:submit value="x">
> A way of retrieving these values through a form bean is to define
> getX(),setX() specify your property as a blank string (property="").
>
> A far more elegant solution is to use a HashMap which will reference the
> specific bean's key which will execute the associated method
> for that take a look at Erik Hatcher's solution which extends
> LookupDispatchAction property whose HashMap maps to different bean key
> http://www.servlets.com/archive/servlet/ReadMsg?msgId=163930&listName=struts-dev
>
> HTH,
> Martin-
>
> ----- Original Message -----
> From: "C.F. Scheidecker Antunes" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <user@struts.apache.org>
> Sent: Sunday, October 09, 2005 8:37 PM
> Subject: Re: Submit buttons getting their value
>
>
> > But where is PropertyName? The only thing passed to the action is request.
> > Thanks
> >
> > Martin Gainty wrote:
> >
> >> Antunes
> >> I thought it was
> >> PropertyName.getValue() ??
> >> M-
> >> ----- Original Message ----- From: "C.F. Scheidecker Antunes"
> >> <[EMAIL PROTECTED]>
> >> To: "Struts Users Mailing List" <user@struts.apache.org>
> >> Sent: Sunday, October 09, 2005 6:17 PM
> >> Subject: Submit buttons getting their value
> >>
> >>
> >>> Hello all,
> >>>
> >>> I have two submit buttons, one with a value of Continue and the other
> >>> Back.
> >>>
> >>> How do I check their values?
> >>>
> >>> I've tried request.getAttribute("submit").toString() but I do not get
> >>> anything.
> >>>
> >>> My buttons are like this:
> >>>
> >>> <html:submit value="back">back</html:submit>
> >>> <html:submit value="continue">continue</html:submit>
> >>>
> >>> They are within the same form structure.
> >>>
> >>> My action has already a Session Bean scope to save the form contents.
> >>> But the submit is not
> >>> in that DynaBean.
> >>>
> >>> I will decide on what to do within the action based on what button is
> >>> pressed.
> >>>
> >>> Thanks,
> >>> C.F.
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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

Reply via email to