Ted,
I tried this with no success. I put two html:image tags into my
login.jsp
<tr><td></td><td><html:image page="/images/lanikai.jpg" property =
"login" value="lanikai" /><td></tr>
<tr><td></td><td><html:image page="/images/larry.jpg" property = "login"
value="larry" /><td></tr>
In the perform method of LoginAction.java I traverse the Enumeration
returned by request.getParameters() looking for a parameter named login.
It's not there. :-(
Here's the code:
java.util.Enumeration enum = request.getParameterNames();
while( enum.hasMoreElements() ){
String str = (String) enum.nextElement();
System.out.println( str + " => " + request.getParameter( str
) );
}
and the output:
course => pebblebeach
login.y => 147
login.x => 129
I have a html:select named course set to pebblebeach. I DO get the
mouseclick x and y values. So, I'm seeing something from my login
control.
I don't see what I'm doing wrong.
thanks
john ware
-----Original Message-----
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 13, 2001 12:59 PM
To: [EMAIL PROTECTED]
Subject: Re: REPOST: How to code and use the html:image tag?
The property and value for the button is passed as a parameter
(property=value), that you can retrieve from the request context.
A typical approach would be to give each button the same property but
different values, like
<html:image page="/images/login.gif" alt="Login" property="login"
value="havePassword" />
<html:image page="/images/forgotpassword.gif" alt="Forgot Password"
property="login" value="forgotPassword" />
Then in the action method, you would use a pattern like
string loginType = request.getParameter("login") ;
if loginType.equals(""forgotPassword") { forward to forgotPassword page
}
if loginType.equals("havePassword") { validate password }
"Suriyanarayanan, Senthil Kumar" wrote:
> What methods should I code inside my LoginForm corresponding to those two
> buttons? How to code the properties (loginButton, forgotPasswordButton).
I'm
> more concerned about whether a particular button is clicked rather then
> their co-ordinates.