David Graham wrote:
I'm confused by your setup:
<arg0 name="fieldname" key="label.bin.title"/>

Yeah, I was trying random stuff. The final thing that worked was:


<field
  property="description"
  depends="maxlength">
  <arg0 key="label.bin.title" resource="true"/>
  <arg1 name="maxlength" key="${var:maxlength}" resource="false"/>
  <var>
    <var-name>maxlength</var-name>
    <var-value>2000</var-value>
  </var>
</field>

I think this is a bug (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23034) because resource="true" should not be required, right?

The name attribute should be the name of the relevant validation rule
listed in the depends clause.  You only have maxlength in depends and
fieldname isn't a Struts validation.

Good to know.


What happens when you do this?
<arg0 name="maxlength" key="label.bin.title"/>

Interesting, that works too. So the complete <field> element is:


<field
  property="description"
  depends="maxlength">
  <arg0 name="maxlength" key="label.bin.title"/>
  <arg1 name="maxlength" key="${var:maxlength}" resource="false"/>
  <var>
    <var-name>maxlength</var-name>
    <var-value>2000</var-value>
  </var>
</field>

Is the name attribute required? It isn't needed for the required check.

David

Matt



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to