Results 1 to 3 of 3

Thread: @Expression condition

  1. #1
    Join Date
    Nov 2006
    Posts
    218

    Default @Expression condition

    Hi,

    unfortunely my application is still using old spring-mod 0.9.2, I hope it's okay this forum for my post:

    I have a bean with these 2 fields and relative annotations:

    @Expression(value="total > 0 and total < 4", applyIf="sportType EQUALS ['org.demo.SportType.FOOTBALL']")
    private Integer total;

    @NotNull
    protected SportType sportType;

    main problem is about the @Expression:

    org.springmodules.validation.util.cel.CelParseExce ption: Could not parse valang expression 'sportType EQUALS ['org.demo.SportType.FOOTBALL']'; nested exception is org.springmodules.validation.valang.parser.ParseEx ception: Could not parse date ['org.demo.SportType.FOOTBALL'] at line 1, column 24.


    basically I'm trying to express this:
    if (sportType equals FOOTBALL) then check if 0<total<4

    how can I do that correctly via annotations?

    Thanks,
    Julio

  2. #2
    Join Date
    Feb 2011
    Posts
    1

    Default

    Thank you so much for your post.
    __________________
    Watch Unknown Online Free

  3. #3

    Default

    Hallo, schön dich zu treffen! Ich zum ersten Mal diese Art von Forum, in der Hoffnung, zu einem späteren Zeitpunkt werden Ihre Führer! ! ! Vielen Dank! ! ! ! !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •