You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bradford Holcombe <bh...@3veni.com> on 2004/01/29 21:54:55 UTC

image input tags and list-backed action forms?

I have a page where I need to submit a form with a variable number of 
image buttons. I have been successful with using the ImageButtonBean 
util to parse the parameters in the request for a single image button. I 
have also been successful using the list-backed action forms for 
variable numbers of text fields. What I haven't been able to do is mix 
both features in a Struts form (ActionForm or DynaActionForm). I have a 
list of these:

<input type="image" src="up.gif" name='move[0]' />
<input type="image" src="up.gif" name='move[1]' />
...
<input type="image" src="up.gif" name='move[N]' />

and I want to read which one was clicked. Ideas?

Thanks for any help.


-- 
Bradford Holcombe
c/o Triveni Digital
40 Washington Road
Princeton Junction, NJ 08550
609.716.3504
bholcombe@3veni.com
www.trivenidigital.com
AIM: colbadhombre (aim:AddBuddy?ScreenName=colbadhombre)
Yahoo!: bradfordholcombe


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: image input tags and list-backed action forms?

Posted by Jay Haines <ja...@norvadallc.com>.
Don't know if this helps or not but I'm using the onclick event of the input
to set a hidden form property that carries back to the bean via reflection.

Jay

----- Original Message -----
From: "Bradford Holcombe" <bh...@3veni.com>
To: <st...@jakarta.apache.org>
Sent: Thursday, January 29, 2004 12:54 PM
Subject: image input tags and list-backed action forms?


> I have a page where I need to submit a form with a variable number of
> image buttons. I have been successful with using the ImageButtonBean
> util to parse the parameters in the request for a single image button. I
> have also been successful using the list-backed action forms for
> variable numbers of text fields. What I haven't been able to do is mix
> both features in a Struts form (ActionForm or DynaActionForm). I have a
> list of these:
>
> <input type="image" src="up.gif" name='move[0]' />
> <input type="image" src="up.gif" name='move[1]' />
> ...
> <input type="image" src="up.gif" name='move[N]' />
>
> and I want to read which one was clicked. Ideas?
>
> Thanks for any help.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org