Hi
Yes when it is from jsp page, i will call Spring controller, but when from
backing bean i am going to use redirect like below
FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext ec = fc.getExternalContext();
try{
ec.redirect(/mycontext/details.spring);
Hi,
i have some input fields for an entity and i want to check if the entered
name does already exist.
So i tried to create an BV constraint for the name property but i also need
the parent entity object (for checking if the entity is transient or not).
In a BV validator i can't get the the
Hi,
i have some input fields for an entity and i want to check if the entered
name does already exist.
So i tried to create an BV constraint for the name property but i also need
the parent entity object (for checking if the entity is transient or not).
In a BV validator i can't get the the
Hello Thomas,
You need some kind of model validation, where you validate the complete
class (when all proeprties are filled in).
You can do it with a Bean Validation constraint (put it on the class level)
or a Custom ExtVal constraint (also on class level)
If you need more help, let us know.
hi thomas,
extval as well as codi allow dependency injection in constraint-validators.
- you can inject and call e.g. a service or repository or any other bean
to check if a name already exists (see e.g. [1]).
regards,
gerhard
[1]
Hi Gerhard,
thanks for your reply.
Of course but the feature i missing is: how can the #{bean.entity} be
validated automatically?
Because it's not binded with an inputField, it will not be automatically be
validated within the Process Validations phase.
Thanks,
Thomas
2011/11/16 Gerhard
hi thomas,
ok - in this case you can find the answer in the 2nd thread you opened.
regards,
gerhard
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
2011/11/16 Thomas Andraschko
Hi Gerhard,
all right, ok!
Yep that's weird. In this mail the MAILER-DEAMON sent me an answer that my
mail is spam. So i resent this mail with another title :) Sorry!
Thanks!
2011/11/16 Gerhard Petracek gerhard.petra...@gmail.com
hi thomas,
ok - in this case you can find the answer in the
Hi,
So i must manually validate the object with BV and creates FacesMessages,
right?
Thanks!
Best regards,
Thomas
2011/11/16 Rudy De Busscher rdebussc...@gmail.com
Hello Thomas,
You need some kind of model validation, where you validate the complete
class (when all proeprties are filled
hi thomas,
rudy is talking e.g. about @ModelValidation in [1] or
AbstractAnnotationModelValidationStrategy in [2].
regards,
gerhard
[1]
10 matches
Mail list logo