I'll be glad to supply more info.

I have 3 pages.  Call them p1, p2, and p3.  On p1 I have a link to
p2 that is in table, with each row having the same link, but a
different value to pass to p2.  On p3 I get to p2 via a forward
in my action class, based on what the user does.  The parameter
needed by p2 must somehow be passed to it, and this is where
my problem lies.

In the action class there is no request.setParameter method to call,
therefore, I can't use a request parameter to pass the value to
p2.  My thought was to pass it to p2, from the p3 action class,
via a request.getSession().setAttribute call.

This means that in p1 I must also set the parameter in a session
attribute.  I assumed I could do this using the onclick handler
of the html:link tag, where the parameter is from an iterate
tag.  I have yet figured out how to do this.  I have tried using
JavaScript, but I apparently don't have access to the session in
JavaScript.  I have tried using a scriptlet, but apparently the
onclick property of the html:link tag does not like scriptlets.

Any ideas on how to handle this?

-- Larry Maturo




Not sure I understand you - could you post some more info?

Not quite sure why you can't pass info in the link?  Do you want a hidden
field
instead?

Cheers,

Dave




"Larry Maturo" <[EMAIL PROTECTED]> on 08/14/2001
11:11:45 AM

Please respond to [EMAIL PROTECTED];
Please
      respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: David Hay/Lex/Lexmark)
Subject:  onclick handler in the context of a struts iterate tag



Sorry to have to ask this again, but I got
no response to my original question.  This
time I only asking about the most important
subset of the problem, so hopefully it will
get a response.

I have a table I fill using the iterate tag.
In the table I have a link that is generated
from the iterate tag data.

I need to pass data in the link without using
a parameter, since when I get to the target
page from an Action Class, instead of this
link, I can't set parameters.

As far as I can tell, that means I will have
to utilize the onclick handler to do the
work, and I will need to pass it, as a
parameter, something made available from
the iterate tag.  How does one do this?

-- Larry Maturo








Reply via email to