@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!
jl
Posted July 22, 2010 at 12:45 PM
How about using validation groups?
Sampath
Posted August 10, 2010 at 7:08 PM
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()) ??
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()) ??