ParametersInterceptor uses stack.setValue(), which uses Ognl.setValue().
Check out OgnlUtil, which has some helper methods for this.

> -----Original Message-----
> From: Ross Mason [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 17, 2003 10:40 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [OS-webwork] [OS-xwork] Spring IoC integration
> 
> 
> I've only brought in the commons libs to use the beanUtils 
> helper to set 
>   external Bean references on the ActionInvocation.  If you have a 
> similar   bean helper in OS we could use that instead.  Mike 
> says there 
> might be something, so I'll have a look.
> 
> I believe the paramsInterceptor pushes the params onto the 
> stack rather 
> that set the properties on the ActionInvocation.
> 
> Cheers,
> 
> Ross
> 
> Cameron Braid wrote:
> 
> > This is great.
> > I would like to see this integrated into xwork propper :)
> > 
> > What does everyone else think ?
> > 
> > One thing - you have introduced a dependency on Commons 
> Bean Utils.  
> > Can
> > this be replaced with something else ?  Could it not use 
> the same method 
> > that the params interceptor uses ?
> > 
> > Thanks.
> > 
> > Cameron.
> > 
> > Ross Mason wrote:
> > 
> >> Hi,
> >>
> >> As per the discussion late last week, we have a patch for Xwork so
> >> that it can use an external container to resolve component 
> references.
> >>
> >> I've created the following issue - 
> >> http://jira.opensymphony.com/secure/ViewIssue.jspa?key=XW-122
> >>
> >> I've added a breakdown of the changes below, in summary, 
> this is how
> >> it works-
> >>
> >> You can configure a action to have external references in the
> >> xwork.xml using a new <external-ref> tag on the action
> >>
> >> When the action is configured the external refs are stored on the
> >> action config.
> >>
> >> When the action is invoked, there is a new interceptor that will
> >> resolve these references.  It does this by using a new 
> attribute on 
> >> the package config called externalReferenceResolver i.e.
> >>
> >> <package name="default"
> >> 
> externalReferenceResolver="com.atlassian.xwork.ext.SpringServl
> etContextReferenceResolver"> 
> >>
> >>
> >> In this case, the SpringServletContextReferenceResolver 
> >> implementation
> >> will handle the work of looking up and setting the 
> references on the 
> >> action.
> >> Note, if a resolver is not found on the actions package, it will 
> >> tranverse up the package heirarchy to find one.
> >>
> >> We have an implementation for Spring, but I have not included it in
> >> this patch as it should probably go into an xwork-ext 
> sub-project.  
> >> Let me know what you want me to do with this...
> >>
> >> Here are the changes and additions to the xwork codebase -
> >>
> >> 1. added 2 new config attributes -
> >>  - a new element external-ref to the action element in the 
>     config.
> >>  i.e <external-ref name="foo">Foo</external-ref>
> >>  where name is the setter method name and Foo is the reference to 
> >> lookup.
> >>  - added an attribute to the package element called 
> >> externalReferenceResolver which supplies a FQ classname to an 
> >> ExternalReferenceResolver implementation.
> >>
> >> 2. Updated the xwork DTD accordingly.
> >>
> >> 3. Added 4 new classes -
> >>  - External Reference - an encapsulation of the external-ref tag
> >>  - ExternalReferenceResolver - an interface to provide 
> >> implementations
> >> for resolving references from an external container
> >>  - ExternalReferencesInterceptor - will resolve references 
> on a given 
> >> ActionInvocation
> >>  - ReferenceResolverException - thrown by ExternalReferenceResolver
> >>
> >> 4. Added support for external references to the 
> ActionConfig. I also
> >> added the attribute packageName to the ActionConfig, so that the 
> >> Interceptor could determine which package the action 
> belonged to in 
> >> order to find the externalReferenceResolver.
> >>
> >> 5. Added support for the externalReferenceResolver attribute to the
> >> PackageConfig.
> >>
> >> 6. Added support for the extra configuration to the
> >> XMLConfigurationProvider and DefaultConfigurationProvider
> >>
> >> 7. Added tests in the
> >> org.opensymphony.xwork.config.ExternalReferenceResolverTest
> >>
> >>
> >> I've attached a cvs patch with all the changes.  I built the patch
> >> against the latest src.
> >>
> >> Cheers,
> >>
> >> Ross
> > 
> > 
> > 
> > 
> 
> 
> 
> -------------------------------------------------------
> This SF. Net email is sponsored by: GoToMyPC
> GoToMyPC is the fast, easy and secure way to access your 
> computer from any Web browser or wireless device. Click here 
> to Try it Free! 
> https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/
g22lp.tmpl
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to