-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: class level constraints -
PostPosted: Thu Jan 27, 2011 5:08 am 
Newbie

Joined: Thu Dec 01, 2005 12:38 pm
Posts: 12
Hi all,

consider the example for class-level contraints for Adress:

@Address
public class Address {
@NotNull @Max(50) private String street1;
@Max(50) private String street2;
@Max(10) @NotNull private String zipCode;
@Max(20) @NotNull String city;
@NotNull private Country country;
}

There is a constraint for zipCode and city:
"the city can often be correlated to a zipcode and some error checking can be done (provided that a validation service is accessible)"

(see viewtopic.php?f=26&t=985340, http://in.relation.to/Bloggers/BeanVali ... onstraints)

In my evaluation of this validation-constraints, i want to get the corresponding properties "zipCode" and "city". I want to mark the corresponding input-fields in my view. (JSF: add a FacesMessages with corresponding clientId.)

How could i do something like that?

best regards
Daniel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.