You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Justin Kennedy <ju...@consortio.com> on 2001/02/02 01:12:34 UTC

using
Hi all

I've created a form like so:
<form:form name="users" action="users.do" focus="username"
type="com.admin.forms.UsersForm">

which contains a select box named 'username'

I want to provide a link which will post the form. I've created
UsersForm.java 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="/users.do?action=AddUsr">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 users.do 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

Thanx,
-Justin