struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pratik Patel <>
Subject Re: How do I populate a DynaValidatorForm?
Date Fri, 26 Sep 2003 15:18:45 GMT
Fenderbosch, Eric wrote:

> Where do you specify the
> @struts.form-field (0..*)
> tags so that XDoclet creates the form for you?
> Right now, I have a hand coded form and XDoclet creates the <form-bean/> section
of my struts-config for me, but I'm not creating the actual ActionForm subclass with XDoclet.

In my domain objects; here's the objects from a Struts app I'm currently 
working on:

Domain Object		XDoclet Generated ActionForm
User			UserForm
Forum			ForumForm
Post			PostForm
Thread			ThreadForm

Sample domain object:

package org.sourceforge.jwebforum.model;
import java.util.Date;

  * @struts.form include-all="true"
  * extends="org.sourceforge.jwebforum.webapp.form.BaseForm"
public class User {
     private String password;
     private String email;
     private Date signupdate;
     private String firstname;
     private String lastname;
     private String username;
     private long userid;

     public User(String password, String email, java.sql.Timestamp 
signupdate, String firstname, String lastname, String username, long 
userid) {
         this.password = password; = email;
         this.signupdate = signupdate;
         this.firstname = firstname;
         this.lastname = lastname;
         this.username = username;
         this.userid = userid;

     public User() {

     /** Password of the user.
      * @struts.validator type="required" msgkey="errors.required"
     public String getPassword() {
         return password;

I hope to have this Struts application uploaded to sourceforge within 
two weeks (with full source, of course). It's still undergoing some 
refactoring, but I can send you the current snapshot if you're interested.


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

View raw message