Could you:

  | @ValidatorClass ( GreaterThanValidator.class )
  | @Retention ( RetentionPolicy.RUNTIME )
  | @Target ( { ElementType.METHOD } )
  | public @interface GreaterThan {
  | 
  |     String elExpr = null;
  |     String mesg = "#{someMessageKey}";
  | 
  | }
  | 

And then in the validator class get a reference to the Seam interpolator and 
invoke the el-binding cast it to Comparable and compare it to the annotated 
data element.

Could do the same for less than, either or, just a thought for the simpler 
things. To do entity exists checks I use a custom interceptor that has access 
to the entity manager to do the queries. 

I am curious about this as well as I have lot's of these kind of things 
floating around and would really like to standardize them and will research it 
further.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014625#4014625

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014625
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to