I'm not familiar with the @Column annotation. If you have any info on how
it works, I'd be happy to add support in.
Even better, the code to add new annotation support is drop dead simple.
let me know if have a solution and I can commit it.
http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicketstuff-hibernate-behavior/src/main/java/org/wicketstuff/hibernate/annotation/HibernateAnnotationComponentConfigurator.java
put(NotNull.class, new HibernateAnnotationConfig() {
public void onAnnotatedComponent(Annotation annotation,
FormComponent component) {
component.setRequired(true);
}
});
put(Length.class, new HibernateAnnotationConfig() {
public void onAnnotatedComponent(Annotation annotation,
FormComponent component) {
int max = ((Length)annotation).max();
component.add(new
AttributeModifier("maxlength", new
Model(Integer.toString(max))));
component.add(StringValidator.maximumLength(max));
}
});
On 7/11/07, Craig Lenzen <[EMAIL PROTECTED]> wrote:
Fair enough Ryan, but one question for you.
Does this only work with the @Length and @NotNull annotations or does it
also work with the attributes of the @Column annotation (nullable and
length)?
Thanks
Craig
Ryan Sonnek-2 wrote:
>
> I may be biased, but i'm using these annotations on a production/live
site
> and they've made my life easier. no more hibernate exceptions bubbling
up
> to the screen because a field was left blank.
>
> On 7/11/07, Craig Lenzen <[EMAIL PROTECTED]> wrote:
>>
>>
>> Has anyone made heavy use of this project yet? Any issues or concerns?
>>
>> -Craig
>>
>>
>> igor.vaynberg wrote:
>> >
>> >
>>
http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicketstuff-hibernate-behavior/
>> >
>> > -igor
>> >
>> >
>> > On 7/11/07, Craig Lenzen <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Unless I was dreaming this the other night I swear someone announced
>> that
>> >> they created a wicket stuff project that added form validation based
>> on
>> >> JPA
>> >> annotations of a domain model? Was I dreaming, if not I can't seem
to
>> >> find
>> >> the project in wicket stuff.
>> >>
>> >> Thanks
>> >> Craig
>> >> --
>> >> View this message in context:
>> >>
>>
http://www.nabble.com/JPA-Annotation-Validation-tf4064781.html#a11549413
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>>
-------------------------------------------------------------------------
>> >> This SF.net email is sponsored by DB2 Express
>> >> Download DB2 Express C - the FREE version of DB2 express and take
>> >> control of your XML. No limits. Just data. Click to get it now.
>> >> http://sourceforge.net/powerbar/db2/
>> >> _______________________________________________
>> >> Wicket-user mailing list
>> >> Wicket-user@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >>
>> >
>> >
>>
-------------------------------------------------------------------------
>> > This SF.net email is sponsored by DB2 Express
>> > Download DB2 Express C - the FREE version of DB2 express and take
>> > control of your XML. No limits. Just data. Click to get it now.
>> > http://sourceforge.net/powerbar/db2/
>> > _______________________________________________
>> > Wicket-user mailing list
>> > Wicket-user@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> >
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/JPA-Annotation-Validation-tf4064781.html#a11550269
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>
-------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>
>
-------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
--
View this message in context:
http://www.nabble.com/JPA-Annotation-Validation-tf4064781.html#a11552674
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user