struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: [OT] Re: Passing value from Struts tag in JSP to Action class
Date Mon, 13 Aug 2007 02:35:12 GMT
--- Oleg Konovalov <> wrote:
> As I mentioned in the original e-mail:
> Have hidden field:
> <html:hidden property="*rowId*" value="-1"/>

Yeah, but... that's a form value, not a JavaScript
variable. The "onclick" attribute expects valid

> I have a bunch of rows and a button corresponding to

> each row.

If you just want a link with a row ID then just build
a URL with a rowId parameter; you can use an image as
a link if you want.

If you're dead-set on using an actual form then you
could either build a small form with the rowId as a
hidden element for each row or set the value of the
hidden rowId element.

You can't do that just by saying "rowId=blahBlah" you
have to access the DOM rowId form field object (using
Prototype or similar, something like:


If you're not doing anything destructive I'd probably
just make a text or image link w/ the parameter in the
URL. If it's destructive then I'd put it behind a
form. That's just me, though; other people will chime
in with other ideas and methods.


Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on

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

View raw message