Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing Expression Language Support [SPR-4] #4739

Closed
spring-issuemaster opened this issue Dec 5, 2003 · 8 comments

Comments

@spring-issuemaster
Copy link
Collaborator

commented Dec 5, 2003

Alef Arendsen opened SPR-4 and commented

Mike's been talking about introducing OGNL support. Seems like a nice idea to me, though not really feasible for the 1.0 release I think. But hey, let's put it in here so we won't forget...

Mike's mail (December 2nd):


Or an even better idea... how about supporting OGNL within the Spring config files? (like Xwork does)

This would be awesome and I just found a second use case for it (the very minute Rob's email came in).

My use case - Maps.

The Map syntax is nice, but not very useful in practicality I'm finding as the key and value of the map are usually related, for instance I often want to put a list of referenced beans into a map, with ref.getName() (or some
method) called for the key.

At the moment I have to add a setBeans(List) method to my class, and then in that setter iterate and add to a map - smelly!

If we allowed OGNL expressions, it would be very simple to do this in the config file itself:

<property value="myMapProp">
<map>
<entry>
<key>$referencedBean.name</key>
<value><ref bean="referencedBean" /></value>
</entry>
... More entries
</map>
</property>

I'm sure there are a million other places where OGNL would be useful too, but AFAIK the above can't be done without it?

Or have I just been at this desk far too long?

M


Affects: 1.0 M4

Attachments:

Issue Links:

  • #5713 Introduce OGNL and OgnlExpressionFactoryBean ("is duplicated by")

Referenced from: commits spring-projects/spring-integration@e571034

8 votes, 6 watchers

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 6, 2003

Dmitriy Kopylenko commented

Does it belong in SpringCORE or in SpringWEB?

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 6, 2003

Dmitriy Kopylenko commented

Changed priority to trivial

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 6, 2003

Dmitriy Kopylenko commented

Let's assign priority of "trivial" to new proposed features.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 1, 2004

Matthew Payne commented

Seems to go hand and hand with the validator support feature meantioned in RC 1.1.

http://opensource.atlassian.com/projects/spring/browse/SPR-69

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 20, 2005

Guillaume Poirier commented

I sent this patch to the dev list before, but I figure I should upload it to JIRA so that it doesn't get lost. The patch has been made against an earlier CVS snapshot, but it seems to still work against the latest version. It does not include the modifications discussed on the mailling list though, such as using <expr type="ognl"> instead of <ognl>. If my contribution is accepted and we can agreed on the syntax, then I'll complete it to include such changes.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 19, 2005

Keith Donald commented

The spring-binding module in spring-projects, used currently by webflow but usable standalone, features an expression parsing and evaluation abstraction that features OGNL.

Keith

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 26, 2006

Rob Harrop commented

I'm moving his to the 2.1 timeframe and renaming it. We do want to include expression language support, but since OGNL is no longer actively maintained (last release was August 2004) we will be evaluating other areas. One are that we are working in is common EL across Java and .NET.

Rob

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 10, 2006

Rob Harrop commented

Unscheduling this since I want to spend more time defining what this will actually look like in the ApplicationContext.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.