Announcement Announcement Module
Collapse
No announcement yet.
@Expression condition Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @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
    Thank you so much for your post.
    __________________
    Watch Unknown Online Free

    Comment


    • #3
      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! ! ! ! !

      Comment

      Working...
      X