[jboss-user] [JBoss Seam] - Re: Unique validation?

petemuir do-not-reply at jboss.com
Thu Aug 3 17:16:48 EDT 2006


What about writing a JSF validator that allows you to specify the current username (or user object) as a parameter:

<my:validateUnique oldValue="#{user.username}" />

The logic would be something like:

if (value == oldValue) {
  |    return true;
  | } else {
  |    // get the list
  |    return list.isEmpty();
  | }

(NB I've not tested this idea)

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963031



More information about the jboss-user mailing list