Thanks for the advice Matej!

The current implementation does *not* support OGNL type nested expressions.
I even have a unit test for it right now.  =)

I'll gladly look into the IPropertyReflectionAwareModel interface to see if
I can improve on this.

I'm not too concerned about this lookup being done multiple times.  It's
only done once per component, and introducing some sort of cache seems like
overhead for now.

On 6/24/07, Matej Knopp <[EMAIL PROTECTED]> wrote:

Hi,

I noticed that you get the field like this:

String fieldName = propertyModel.getPropertyExpression();
Class type = propertyModel.getTarget().getClass();
...
Field field = type.getDeclaredField(fieldName);
...

That means that the lookup is done on every configuration. Also will
this work for expression such as "property1.property2.property3"?

Property and CompoundProperty models in wicket implement the
IPropertyReflectionAwareModel interface which can be used to get the
reflection information. I think you should use those instead.

-Matej


On 6/23/07, Ryan Sonnek <[EMAIL PROTECTED]> wrote:
> I don't want to sound like a databinder basher, but I want to make this
> solution very *non-invasive*.  I don't want to have to implement
specific
> interfaces or use specific components for this to work.
>
> My solution works with "standard" wicket components and property
models.  No
> need to change your whole application just to get UI validation.
>
>
> On 6/23/07, Ryan Sonnek <[EMAIL PROTECTED]> wrote:
> > I've looked at databinder in the past, and although it may be useful,
I
> think it's a bit heavyweight for what I'm trying to achieve.
> >
> > In my opinion, database access should be abstracted away from the UI
layer
> altogether, which leaves the goals of databinder questionable.  Does
anyone
> remember the horror of the JSP tags that directly connected to
datbases??
> Spring integration is a much more desirable location for database
access,
> and there  is already excellent spring integration with wicket.
> >
> > My goal is simply to integrate hibernate into wicket for "relevant" UI
> features.  Validation is an excellent example where wicket should simply
> re-use the same backend validation and display good user feedback
instead of
> waiting for the hibernate validation fire and throwing a big fat
stacktrace.
> >
> >
> >
> > On 6/23/07, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > >
> > > On 6/23/07, Ryan Sonnek <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > > Just sending out a quick "release announcement" for a new
> Hibernate/Wicket integration in the wicketstuff project.  The
> HibernateAnnotationComponentConfigurator automatically
> configures a wicket component based on the POJO's Hibernate annotations.
> > > >
> > > > one especially cool feature is that you can register this behavior
for
> your *entire* application, without worrying about adding this
functionality
> to each page/component.
> > > >
> > > > Take a look and let me know what you think!
> > > >
> > > >
>
http://jroller.com/page/wireframe?entry=hibernateannotationcomponentconfigurator
> > >
> > >
> > > you should consider teaming up with databinder and working on this
> there.
> > >
> > > -igor
> > >
> > >
> > >
>
-------------------------------------------------------------------------
> > > 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
>
>

-------------------------------------------------------------------------
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

Reply via email to