You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by sudhakar <ys...@rediffmail.com> on 2002/12/04 08:15:03 UTC

Submitting the entire list contents.

I have an application in which the user selects the products list, 
which are there in the list boxes, as the user adds the products 
I've to populate one another list(cart list) which is there in the 
same html page.  Finally when he submits the html page, he has to 
submit the contents of the cart list contents to the server.
What my question is how to submit the entire contents to the 
server,
Is there any way to to populate the entire contents in the list to 
a array in the form bean.

Pl give the solution.

Thanks in advance.

-Sudhakar




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: accessing value

Posted by John Devine <jo...@comcast.net>.
Ignore this question -- browsers ignore the value of the <input
type="image">. Apparently it's used just for javascript, though I can't
see how. Guess I'll just us a link-image with a javascript submit.



-----Original Message-----
From: John Devine [mailto:johnjdevine@comcast.net] 
Sent: Wednesday, December 04, 2002 5:11 PM
To: 'Struts Users Mailing List'
Subject: accessing <html:image> value

The documentation lists a "value" attribute for the <html:image> tag,
but I can't seem to get it to do anything for me. Is this attribute of
use or just a leftover since it inherited from the <html:submit> tag?



I would like to use an <html:image> in a list of query results to
activate an action on a certain result. Each <html:image> tag would have
the same name (property="addToCollection") and the value would be the id
of the data object:

<code>
 
   <html:image page="/images/check.gif" 
                value="<%=movie.getId()%>"  
                alt="I own this movie"
                property="addToCollection" />

</code>

Of course there would be many such <html:image> tags on each page of
results each with the same name ("property") and different values. The
entire page is a form, so each of the images must submit the same form,
but with a unique value for "addToCollection".

When the button is clicked, only "addToCollection.x" and
"addToCollection.y" come through as request parameters. 

Is there a way to access the value? 

Or do I have to go with javascript or something else?

TIA.



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


accessing value

Posted by John Devine <jo...@comcast.net>.
The documentation lists a "value" attribute for the <html:image> tag,
but I can't seem to get it to do anything for me. Is this attribute of
use or just a leftover since it inherited from the <html:submit> tag?



I would like to use an <html:image> in a list of query results to
activate an action on a certain result. Each <html:image> tag would have
the same name (property="addToCollection") and the value would be the id
of the data object:

<code>
 
   <html:image page="/images/check.gif" 
                value="<%=movie.getId()%>"  
                alt="I own this movie"
                property="addToCollection" />

</code>

Of course there would be many such <html:image> tags on each page of
results each with the same name ("property") and different values. The
entire page is a form, so each of the images must submit the same form,
but with a unique value for "addToCollection".

When the button is clicked, only "addToCollection.x" and
"addToCollection.y" come through as request parameters. 

Is there a way to access the value? 

Or do I have to go with javascript or something else?

TIA.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>