commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <...@Germuska.com>
Subject [chain] add expression evaluation?
Date Thu, 02 Dec 2004 22:40:31 GMT
In a discussion on the struts-user list, I got around to describing a 
configuration format which made me wonder if folks would tolerate 
some kind of expression evaluation engine in chain.


The musing repeated below:

At 1:57 PM -0600 12/2/04, Joe Germuska wrote:
>I think you could find the view processor command by using the 
>standard Chain "lookup action".  Well, out of the box, its "nameKey" 
>property would depend on some String value being placed into the 
>context under a certain key, and as it is now, we're talking about 
>using a String property of an Object in the context under a certain 
>key.  If we gave the LookupCommand an expression language (JEXL, 
>perhaps?), then we could do something like this, which seems cool:
>
>       <command
>           className="org.apache.commons.chain.generic.LookupCommand"
>         catalogName="struts-view-preprocess"
>                nameKey="${context.forward.name}"
>            optional="true"/>
>
>or possibly work some magic to make the "context" prefix assumed. 
>Anyone  have an opinion about adding a JEXL dependency to Chain, or 
>whether this would be best left to a Struts subclass of 
>LookupCommand?

Ideas?  I'm not sure right now of the scope of this proposal -- is it 
just for the LookupCommand?  Is it somehow implemented more widely? 
How can you do that when Chain is first-and-foremost an API?

I can certainly see some of these questions leading folks to throw up 
their hands and say "let's just keep it simple."  There's no critical 
reason to add this dependency to the core, but when you think about 
the expressive power it would provide in the config files, it seems 
pretty cool.

Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message