Aleksander Stensby
Aleksander is a lead software developer and co-owner of Integrasco A/S where he has been working since 2004. He has broad experience with Java development and technologies such as Lucene Search, Solr, Hibernate, Mysql, Spring and Hibernate Shards, with keen interests in search, machine learning, pattern recognition and scalability. Aleksander have a MSc from the University of Agder in Norway and Carleton University in Ottawa, Canada. His Master’s thesis was awarded University Senate Medal for best Master thesis in 2008. Aleksander enjoy working with challenging tasks and solving AI related problems. In addition to his work at Integrasco, Aleksander also give public talks related to search, scalability and machine learning.
E-mail: aleksander@ and please add “codemunchies.com”
Website: http://aleksander-stensby.blogspot.com
Twitter: http://twitter.com/astensby
LinkedIn: http://www.linkedin.com/in/aleksanderstensby
Facebook: http://facebook.com/aleksander.stensby
Jaran Nilsen

Jaran has been working as a lead developer at Integrasco AS since it’s startup in 2004. His interests in software development are ranging from the lowest bit to design patterns and development methods. On a daily basis his main area of responsibility is data mining technology as well as team management. Jaran has a MSc in from the University of Agder in Norway, majoring in software development. In addition to his work at Integrasco AS, he is also running an open source project called iTunes Agent over on Sourceforge, which provides non-iPod owners with a way to transfer music from iTunes to their media player. Since the end of 2008 he has also been a regional leader of the Norwegian Java User Group, javaBin.
E-mail: jaran@ and please add “codemunchies.com”
Website: http://www.jaranweb.com
Twitter: http://twitter.com/jarannilsen
LinkedIn: http://www.linkedin.com/in/jarannilsen
Facebook: http://facebook.com/jaran.nilsen
Projects: iTunes Agent, jade4spring
Our guest authors
Want to become a guest author? Contact us!


I wish this would work with Gigaspaces. Its spring based….so perhaps one day.
Doesn’t it work with GigaSpaces? Is there a reason it shouldn’t?
Thanks for the Guava series; I find it a very useful to understand and use the library;
Hi Jaran,
Nice finding.
Asked the two authors about integration into Polarion ALM.
BR
Robert
Hi, great post. I have a question.
What is the sintax for the errors messaged keys in the resouce boundle?
{key} = Name must be provided
Thanks
Hi, Augustin.
The syntax for the error message keys is as follows:
Constraint.CommandName.FieldNameExample:
NotEmpty.userForm.nameHope this helps.
Jaran
Using the code provided, I couldn’t get it to work until I added the generics to the ConstraintValidator:
public class UrlValidator implements ConstraintValidator {
@Override
public void initialize(final Url target) {
}
@Override
public boolean isValid(final String url,
final ConstraintValidatorContext context) {
return url.startsWith("http");
}
}
@Chad You are absolutely right, and the generics were there when the post was created. It seems Wordpress decided to remove them in the saving process
Fixed it now. Thanks for pointing it out!
How about using validation groups?
if errors presence, it goes back to same page. But i am loosing my drop down values. Should I set all the form data related fields (eg: drop down values, etc) again in the if block (if (results.hasErrors()) ??