struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Barrows" <>
Subject RE: Re: Re: Re: Why does <html:submit> work differently than <html:link action="">?
Date Wed, 28 Jul 2004 17:25:33 GMT

> -----Original Message-----
> From: Andrew Close []
> Sent: Wednesday, July 28, 2004 10:17 AM
> To: Struts Users Mailing List
> Subject: Re: Re: Re: Re: Why does <html:submit> work differently than
> <html:link action="">?
> Sorry Michael, i wasn't ignoring you.  you must've responded to each
> of my responses to the others. :)
> the original problem was that i have to add a product to the database.
> when the user clicks the initial add button they are taken to a page
> that has three links on it.
> Add Member Product
> Add NonMmeber Product
> Add Product via Search
> this intermediary page is a form that also contains three hidden
> fields.  first is productType (member, nonmember or search)  the other
> two fields contain values relating to the customer passed from the
> previous page when the customer clicked the add button.
> looking at the source for the current page with the three links on it
> reveals that the two hidden values from the previous page are set and
> the third, prodType, is blank.  when the user clicks on one of the
> three links a small javascript function populates the third hidden
> field, prodType, before submitting the form.  in my actionform and
> action i see the prodType but not the other two customer variables
> that were on the form.
> so i need to be give the customer the ability to add a new product to
> the database.  there are three different types of products that can be
> added and the type needs to be determined up front so the customer can
> be directed to the appropriate form/page.  hyperlinks were preferred
> to multiple submit buttons.  and radio buttons with a single submit
> button were ruled out.

I would suggest a large stick, a room with no windows and quality time with the person making
those sugestions.  On the other hand our marketroids (think hemhroids) are kind of the same
way about some issues.  You can see their hand all over our website *SIGH*.

Bad marketroid!!! No Martini!!!!

> to turn this back into a Struts related issue... :)
> i'm a Struts newbie.  and while playing around with this situation i
> wasn't seeing my values getting populated in my actionform.  i figured
> it had to do with the way i set up my Struts tags, <html:link>, and
> their parameters.
> so in the Struts world, is there a way to submit a form using a
> hyperlink without using javascript?

Nope.  It's not a struts issue at all... it's an HTML issue.   Struts tags just generate html
(well, except the validation tag.).  What you want would be difficult to genreate in any kind
of sensical way.

> i know this comes down to poor design and basic web application
> functionality.  so i apologize that this has been drawn out.
> thank you all for being patient and helpful.
> andy
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message