struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cristian Peraferrer <>
Subject [s2] Custom field validator with params containing OGNL expression
Date Tue, 07 Jul 2009 08:24:36 GMT

I have implemented a field validator that validates the username is
not already in the database (to avoid overwriting).
But in the validator call (or configuration), I need to pass a
parameter that is another field in the form. Here my code:

<field-validator type="usernameavailable">
      <param name="userId">${enterprise.enterpriseId}</param>
      <message>This username is already taken.</message>

The 'userId' is a Long value. I have tested putting a hardcoded long
value (<param name="userId">34</param>) and it worked, but
it doesn't like the OGNL expression. What I'm doing wrong?

Thanks in advance,

GPG Key-ID: 0x564903FA - JID:

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

View raw message