struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Kennedy" <>
Subject using <html:link to post a form ?
Date Fri, 02 Feb 2001 00:12:34 GMT
Hi all

I've created a form like so:
<form:form name="users" action="" focus="username"

which contains a select box named 'username'

I want to provide a link which will post the form. I've created to validate, and it returns an error if username isn't
selected. Everything works fine with:
<form:submit value="Add User"/>

But I want to accomplish this with:
<html:link page="/">Add User</html:link>

When I click on this link, it comes back to the same page with the error
message I provided in UsersForm.validate() of "you must select a username",
even though I've selected a username.

So, by specifying for page in <html:link doesn't the controller
servlet populate UsersForm with the request params and call validate ? It's
obviously calling validate, but the bean properties seem like there not
being set.

The reason I want links instead of submit button is because I'm going to
have multiple links that specify a different '?action=' so the target page
can process accordingly


View raw message