[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2245) Custom validator disables hibernate default validator
by dapeng wang (JIRA)
Custom validator disables hibernate default validator
-----------------------------------------------------
Key: JBSEAM-2245
URL: http://jira.jboss.com/jira/browse/JBSEAM-2245
Project: JBoss Seam
Issue Type: Bug
Components: JSF
Affects Versions: 2.0.0.GA
Reporter: dapeng wang
Fix For: 2.0.1.GA
The default hibernate validator doesn't work anymore, as soon as a custom validator is added to the component, though the text field is put inside a validateAll tag.
In the class ValidateAllRendererBase following code is found, which is buggy in my opinion:
if ( evh.getValidators().length==0 && evh.getValidators().length == 0 )
{
evh.addValidator( new ModelValidator() );
}
First of all, I don't understand, why you check the same condition twice. Second, I have no clue, why you only add the ModelValidator, if here is no other validator. I would exactly like to combine the hibernate validator with my custom one.
Pleas remove the if check. I would also like to help and fix this bug.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 4 months
[jbossseam-issues] Accessing entities outside of injection
by David Radunz
Hey,
Not sure if this is the correct list to be posting to, if it isn't
please advise the appropriate place. I have a web application that does
not use persistence (hibernate) as we have a non-database data source
and a custom mediation layer between that and Seam. I have a need to get
a new (or existing) instance of a named entity (or what ever:
action/controller as well) by code. The reason I am posting a request to
the mailing list is because we are using the @Install annotation and as
such I cannot instantiate the class directly because I of course want
the "installed" version.
Something like the following would be great..
---------------------------
package test.product;
@Name("person")
@Install(1)
public class Person {
}
---------------------------
---------------------------
package test.site;
@Name("person")
@Install(2)
public class Person extends test.product.Person {
}
---------------------------
And then in code somewhere use "person" to obtain a new or existing
instance of "test.site.Person" (being the installed version). Perhaps
some sort of EL resolving code?
Any ideas?
David
--
David Radunz
Senior Developer
Utiba Pty Ltd
ph: +613 9606 0444
ad: Level 6, 190 Queen St, Melbourne, VIC, 3000, Australia
18 years, 4 months