(Sorry for the cross-posts. This is definitely an xdoclet problem, but I can
see how a fix/workaround could come from the Struts Validator or Hibernate
perspective also.)

I have a class hieararchy that is four levels deep in places. It works well,
generating my Struts config file, validation file, tablibs, and Hibernate
mapping files ... with one exception.

Here is the portion of the hierarchy that causes the problem.

 BaseObject\
           |-->BaseObjectNameKeyed
           |
           |-->BaseObjectOwnerNameKeyed

There is a property "name" on BaseObject. It has @struts.validator tags for
a required and maxlength validation, and also @hibernate.property tags.
However I need to override the "getName" method in BaseObjectNameKeyed and
BaseObjectOwnerNameKeyed in order to add a single @hibernate.column tag to
specify retrieval indexes for the database.

The most obvious problem occurs in my Struts validator descriptor. They end
up having an extra "<arg1..." tag after the correct one (the entire field
validation is at the bottom of this post). This screws up my maxlength
validation in that the error message says "Name can not be greater than
characters"  instead of "Name can not be greater than 24 characters

Is there a way to fix this? Its not something I can easily use and ant
"replace" to fix. Or is there a different approach that might solve the
problem?

Thanks - Richard

BEGIN EXAMPLE
  <formset>
      <form name="formPoRoleForm">
              <field property="name"
                     depends="required,maxlength">
                  <msg name="required"
                    key="errors.required"/>
                  <msg name="maxlength"
                    key="errors.maxlength"/>
                  <arg0 key="formPoRoleForm.name"/>
                  <arg1 name="maxlength"
                    key="${var:maxlength}"
                      resource="false"/>
                  <arg1 name="maxlength"
                    key="false"/>
                  <var>
                    <var-name>maxlength</var-name>
                    <var-value>24</var-value>
                  </var>
              </field>
              ...
END EXAMPLE




-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to