Stripes

Add support for Hibernate validations

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: Release 1.3
  • Fix Version/s: None
  • Component/s: Validation
  • Labels:
    None

Description

Here's some proposed classes to allow support for validation using Hibernate validation annotations. It refactors OgnlActionBeanPropertyBinder.java (as a new class to allow both implementations to exist) to allow a Hibernate validator subclass to extend it.

Any class ending in "1_3" is a class where I would have made changes to the existing class bundled with stripes v1.3. This allows the classes to be dropped in and run in parallel with the current OGNL binder. The class "DefaultActionBeanPropertyBinder" is the replacement for the existing "OgnlActionBeanPropertyBinder". You should be able to specify this class in the web.xml and have everything work as before. The class "HibernateActionBeanPropertyBinder" is the subclass that also does Hibernate validation in addition to any validation that would have been performed in the parent class.

Activity

Hide
James Stangler added a comment - 30/Apr/06 8:08 AM

Here's the java files.

Show
James Stangler added a comment - 30/Apr/06 8:08 AM Here's the java files.
Hide
Frederic Daoud added a comment - 26/Sep/09 8:52 PM

Hibernate Validator annotation support would be outside of the scope of core Stripes. If anything, it would be in Stripersist or another add-on/plugin.

Show
Frederic Daoud added a comment - 26/Sep/09 8:52 PM Hibernate Validator annotation support would be outside of the scope of core Stripes. If anything, it would be in Stripersist or another add-on/plugin.
Hide
Sebastien Lorber added a comment - 25/Jan/12 8:06 AM

Not exactly the same idea but it could have been cool, when binding data into hibernate entities, to read the hibernate metadata to generate automagically things like the max length of text inputs etc

Show
Sebastien Lorber added a comment - 25/Jan/12 8:06 AM Not exactly the same idea but it could have been cool, when binding data into hibernate entities, to read the hibernate metadata to generate automagically things like the max length of text inputs etc

People

Vote (0)
Watch (1)

Dates

  • Created:
    30/Apr/06 8:08 AM
    Updated:
    25/Jan/12 8:06 AM
    Resolved:
    26/Sep/09 8:52 PM