|
From: Peter d. H. <pe...@de...> - 2003-10-17 09:46:59
|
A richer expression language would have its use cases. The right thing to do might be to make the language pluggable :^) A little while ago I rolled a simple generic Validator implementation -- configured using the Spring configuration file -- using JEX (http://www.plotnix.com/jex/). This a little pluggable expression language framework. I added JEX plugins for regexps and the JSTL expression language so I could use these (in addition to JavaScript, BEXL and JXPath) to formulate validation rules. I never fed this back to the list because the implementation is not quite generic enough (eg there's no i18n support), but having used it for a while it seems there's a fair bit of mileage in the idea. A decent expression language is IMHO exactly what's missing from the brilliant-idea-but-flawed-execution Struts Validator. In any case, I can think of a number of reasons why it might be good to adopt JEX or a Spring equivalent of it. On a not entirely unrelated note, one of the things I've been missing from Spring is what you might call "anonymous beans". In some situations, I don't really want to pollute the namespace with beans that will only ever be used in one place: <bean id="foo" class="eg.Foo"> <property name="bar"><ref bean="bar"/></property> </bean> <bean id="bar" class="eg.Bar"/> But would like to be able to write something like <bean id="foo" class="eg.Foo"> <property name="bar"><bean class="eg.Bar"/></property> </bean> Has this been discussed before? Spring is the best thing I've come across for a while and I'd love to contribute something back :^) - Peter ----- Original Message ----- From: "Colin Sampaleanu" <col...@ex...> To: <spr...@li...> Sent: Wednesday, October 15, 2003 8:17 PM Subject: [lists] [Springframework-developer] Expression language for use in ApplicationContext > Has an expression language available for use in the app context ever > been considered? (as per email below) > > -------- Original Message -------- > Subject: Re: Spring XMLBeanFactory > Date: Wed, 15 Oct 2003 15:14:42 -0400 > From: Colin Sampaleanu <col...@ex...> > To: Vladimir Blagojevic <vla...@cs...> > References: <Pin...@bl...> > > > > It can't do this (to the best of my knowledge). There is an expression > language available for use in the JSP tags, but this is not accessible > in the contexts. > > If there is enough of a use case for this it could certainly be done. > One way would be to try leveraging the existing expression language > code. I have no idea how easy this would be to do since I've actually > never touched the web ui code. Another mechanism would be to bring in > something like OGNL, which is quite powerful... > > What is your usage scenario? > > > Vladimir Blagojevic wrote: > > >Colin, > > > >Does XMLBeanFactory support reading property of bean X and assigning it > >to bean Y within declarative xml config file? I don't think so, but is > >there any chatter on the lists about that? > > > >Cheers > > > > > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. > See the people who have HELPED US provide better services: > Click here: http://sourceforge.net/supporters.php > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |