You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Samuel Rochas <sa...@andinasoft.com> on 2004/05/04 23:34:12 UTC
button as link
Hello,
I would like to use a button as a link.
I used to solve that, before struts, with a form containing only a button.
With struts, it seems I have to declare a form object in the
struts-config.xml, create a class for that empty form, etc.
Is there a simple way to solve that?
Sincerly
Samuel Rochas
--- andinasoft SA - Software y Consulting ---
Mariano Aguilera 276 y Almagro - Quito, Ecuador
Tel. +593 2 290 55 18 ---- Cel. +593 9 946 4046
--------- http://www.andinasoft.com ---------
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: button as link
Posted by Riyad Kalla <rs...@email.arizona.edu>.
Sam,
I do the same thing you are, and do what Hubert has suggested. It works
nicely. I always define atleast one throw-away dynaform to use for these
purposes, then you can use the form as a link, no problem.
On Tuesday 04 May 2004 02:37 pm, Hubert Rabago wrote:
> You can use an empty dyna form:
>
> <form-beans>
> <form-bean name="emptyForm"
> type="org.apache.struts.action.DynaActionForm"/> </form-beans>
>
> --- Samuel Rochas <sa...@andinasoft.com> wrote:
> > Hello,
> >
> > I would like to use a button as a link.
> >
> > I used to solve that, before struts, with a form containing only a
> > button.
> >
> > With struts, it seems I have to declare a form object in the
> > struts-config.xml, create a class for that empty form, etc.
> >
> > Is there a simple way to solve that?
> >
> > Sincerly
> > Samuel Rochas
> >
> > --- andinasoft SA - Software y Consulting ---
> > Mariano Aguilera 276 y Almagro - Quito, Ecuador
> > Tel. +593 2 290 55 18 ---- Cel. +593 9 946 4046
> > --------- http://www.andinasoft.com ---------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
>
> __________________________________
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs
> http://hotjobs.sweepstakes.yahoo.com/careermakeover
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: button as link
Posted by Samuel Rochas <sa...@andinasoft.com>.
Hi Hubert,
Hubert Rabago wrote:
> You can use an empty dyna form:
Great, that is doing the job.
I was afraid I needed to create the corresponding class too, but
since the declaration is needed only in the struts-config.xml, that's fine.
Thanks a lot.
Samuel
--- andinasoft SA - Software y Consulting ---
Mariano Aguilera 276 y Almagro - Quito, Ecuador
Tel. +593 2 290 55 18 ---- Cel. +593 9 946 4046
--------- http://www.andinasoft.com ---------
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: button as link
Posted by Hubert Rabago <ja...@yahoo.com>.
You can use an empty dyna form:
<form-beans>
<form-bean name="emptyForm" type="org.apache.struts.action.DynaActionForm"/>
</form-beans>
--- Samuel Rochas <sa...@andinasoft.com> wrote:
> Hello,
>
> I would like to use a button as a link.
>
> I used to solve that, before struts, with a form containing only a button.
>
> With struts, it seems I have to declare a form object in the
> struts-config.xml, create a class for that empty form, etc.
>
> Is there a simple way to solve that?
>
> Sincerly
> Samuel Rochas
>
> --- andinasoft SA - Software y Consulting ---
> Mariano Aguilera 276 y Almagro - Quito, Ecuador
> Tel. +593 2 290 55 18 ---- Cel. +593 9 946 4046
> --------- http://www.andinasoft.com ---------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: button as link
Posted by Pedro Salgado <sa...@04web.com>.
On 04/05/04 22:34, "Samuel Rochas" <sa...@andinasoft.com> wrote:
> Hello,
>
> I would like to use a button as a link.
>
> I used to solve that, before struts, with a form containing only a button.
>
> With struts, it seems I have to declare a form object in the
> struts-config.xml, create a class for that empty form, etc.
>
> Is there a simple way to solve that?
>
What about a button with an onclick Javascript event that redirects you to
the desired Struts action passing any parameters by building the url?
Pedro Salgado
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org