[jboss-user] [JBoss Seam] - Re: Search entity doesn't need to be validated

jazir1979 do-not-reply at jboss.com
Tue Dec 18 22:26:30 EST 2007


I don't use seam-gen, and my project doesn't use entity fields to carry across search values... but I wonder, why would you even have your search fields inside s:validate in your UI?

"menashe" wrote : After looking at the seam examples and seamgen code on how the search is done. It seams to me that there is a shortcoming in seam, since, seam search uses a new entyty of the search class but if it works only if there are no validation on the class. When this is used with any class that uses validation then validation errors occur.
  | Say, a  simple person class with just firstname and lastname both are notnull and are 3 to 20 chars long.
  | Now, when user searches for any person by lastname 'smith', seam complains that firstname is null or if user tries to search for person with a firstname (that starts with) 'ja' (as in jane or jack) it also complains that the firstname is too short.
  | 
  | Is there a way do disable the validation?
  | 
  | Other then creating a duplicate class without validation (since, AFAIK, it is not possible to extend original class and then overwrite the validation annotations there, it can be said that can be done backwards to first create class that will be used for search and then extend it to create an entity class but it doesn't sound like the right approch to me for some reason.) I will like to know what is the best practice in this situation, since this is a very basic issue I am sure many users have delt with it or will be working on it at some later time?
  | 
  | Thanks for your time.

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

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



More information about the jboss-user mailing list