Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
valang and function in error parameters Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • valang and function in error parameters

    Hi, I am trying to integrate valang validation, however, I can't make use of function in error_parameters.

    Code:
    { name : ? is not blank : 'name is required' : 'errors.required' : resolve('label.username') }
    this valang rule gives exception:

    Code:
    org.springmodules.validation.valang.parser.ParseException: Encountered "}" at line 3, column 142.
    
    Was expecting:
    
        "," ...
    however, I do something like
    Code:
    { name : ? is not blank : 'name is required' : 'errors.required' : resolve('label.username') }
    and valang works flawlessly, although the errors.required only requires one parameter, i.e.

    Code:
    errors.required={0} is mandatory
    Is there anyone able to use function in error_parameters that can point me out what I have done wrongly ? I read the Spring module reference manual and didn't find example about function in error_parameters. Thanks.

    P.S. I am using Spring Framework 2.0RC4 + Spring modules 0.6

  • #2
    Has anyone figured this out yet? I am having the same problem.

    the code below produces the error mentioned in the original post.

    Code:
    { name : ? has text : 'name is required' : 'errors.required' : resolve('name')  }
    this code does not pull the argument from the resources file:

    Code:
    { name : ? has text : 'name is required' : 'errors.required' : 'name'  }

    Comment


    • #3
      I am running into the same issue and have tried different combinations but none seem to work. Has anyone got this to work?

      Comment


      • #4
        Include ORO jar files it will solve your problem. It is a expression parser
        Last edited by buntyindia; Oct 6th, 2007, 03:03 PM.

        Comment

        Working...
        X