From: Oliver H. <Ol...@ou...> - 2004-06-03 23:29:17
|
As the stop gap measure, couldn't you extend DataBinder/BindException /BeanWrapper so that they support binding to Maps or DynaBeans etc?=20 If you override BindException createErrors(Object target, String objectName) to return an instance of BindException that uses a custom BeanWrapper suitable for whatever the type you really want to bind to, I think it should work. I could be quite straight forward, though there is a lot of "bean" related code in this area so possibly there could be some nasty surprises. Oliver > -----Original Message----- > From: spr...@li...=20 > [mailto:spr...@li...]=20 > On Behalf Of Andy Depue > Sent: Friday, 4 June 2004 8:16 AM > To: spr...@li... > Subject: Re: [Springframework-rcp-dev] Beans >=20 >=20 > The use of JavaBeans for configuration is not what I'm=20 > referring to. I too=20 > would not want to change the way Spring performs=20 > configuration based on=20 > standard JavaBeans. What I'm referring to is actual GUI=20 > components provided=20 > by the spring-rcp project that make it easy to view and edit JavaBean=20 > properties from within a UI. For example, spring-rcp=20 > provides a dialog that=20 > allows you to pass in a JavaBean and a property name. The=20 > input dialog will=20 > then automatically prompt the user for the value of the property and=20 > automatically assign that value to the property on the=20 > JavaBean. If my GUI=20 > application happens to use some other mechanism for=20 > representing business=20 > data (such as a ResultSet, a service data object, or a Map),=20 > then I can't use=20 > spring-rcp's nifty input dialog anymore. >=20 >=20 > On Thursday 03 June 2004 02:35 pm, Ronald Haring wrote: > > I'm not sure if I speak out of line, but the complete basis of the=20 > > spring framework is build around javabeans, so that would=20 > explain why=20 > > there are no dynabeans involved, and frankly, I dont think=20 > we need it.=20 > > The spring is used mostly to configure things and with most=20 > configure=20 > > properties, you are pretty sure what their names will be.=20 > Where would=20 > > you want to use the javabeans for in the spring-rcp using=20 > maps? Btw,=20 > > you can fill maps by using <bean id=3D"whatever"=20 > > class=3D"mybean.with.maps"> > > <property name=3D'theMap"> > > <props> > > <property key=3D"someKey">somevalue</property> > > <property key=3D"anotherKey">anothervalue</property> > > </props> > > </property> > > </bean> > > > > Cheers > > Ronald > > > > Andy Depue wrote: > > >I've noticed quite a bit of support in spring-rcp for=20 > JavaBeans and =20 > > >properties (binding things to a property, setting up input=20 > rules for=20 > > >a property, etc). This is great. However, there are=20 > times when we=20 > > >work at a more "meta" level than JavaBeans in a UI. For example,=20 > > >some people use Maps of name/value pairs instead of JavaBeans,=20 > > >others might use DynaBeans (from Apache), and others might use=20 > > >service data objects, where you retreive property values via=20 > > >get(propertyName) or set(propertyName, > > > value) calls. I believe it would be worth it to keep spring-rcp > > > bean/property access generic enough that it could be used=20 > with any kind > > > of "object with properties" concept, and not tied to=20 > JavaBeans alone. It > > > could be something as simple as some sort of=20 > "PropertyAccessor" interface > > > with a default JavaBeans implementation. > > > > > >Thoughts or comments? > > > > > > > > >------------------------------------------------------- > > >This SF.Net email is sponsored by the new InstallShield X. > > > > > >>From Windows to Linux, servers to mobile, InstallShield X=20 > is the one > > > > > >installation-authoring solution that does it all. Learn more and=20 > > >evaluate today! http://www.installshield.com/Dev2Dev/0504 > > >_______________________________________________ > > >Springframework-rcp-dev mailing list=20 > > >Spr...@li... > >=20 > >> https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by the new InstallShield X. From=20 > > Windows to Linux, servers to mobile, InstallShield X is the one=20 > > installation-authoring solution that does it all. Learn more and=20 > > evaluate today! http://www.installshield.com/Dev2Dev/0504 > > _______________________________________________ > > Springframework-rcp-dev mailing list=20 > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > From Windows to Linux, servers to mobile, InstallShield X is=20 > the one installation-authoring solution that does it all.=20 > Learn more and evaluate today!=20 > http://www.installshield.com/Dev2Dev/0504 >=20 > _______________________________________________ > Springframework-rcp-dev mailing list=20 > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev >=20 |