You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "tarek.nabil" <ta...@isoft.ae> on 2005/07/09 14:39:16 UTC

Message arguments referencing variables

Hi everyone,

I'm using Struts 1.1B2 and the the validation framework. I'm trying to
use the "maxlength" validator that ships with Struts.

According to chapter 12 in the "Struts in Action" book, one should do
that following:

<field property="remarks"
depends="maxlength">
<arg0 key="responseForm.remarks.displayname"/>
<arg1 name="maxlength" key="${var:maxlength}" resource="false"/>
<var>
<var-name>maxlength</var-name>
<var-value>1000</var-value>
</var>
</field>

Now, I tried this, and the key="${var:maxlength}" thing is not working,
cause I get null instead. I looked into the source, for both 1.1b2 and
1.1rc2 and I can not find any code that handles this case. From what I
see in the code, if resource is false then the key should be taken as
is, else it should be looked up in the resources.

Can someone please help me with this issue.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org