|
From: Erwin V. <erw...@er...> - 2005-06-02 09:08:19
|
You could write a simple custom tag that takes an OGNL expression and does
what you want to do. Something like:
<keith:out
value="${transactionContext.transactionCoordinator.amountDeposited}"/>
Erwin Vervaet
erw...@er...
----- Original Message -----
From: "Keith Donald" <ke...@in...>
To: <spr...@li...>
Sent: Thursday, June 02, 2005 9:49 AM
Subject: RE: [Springframework-developer] am I missing something
> Juergen,
>
> I should clarify: I meant from a view template like a .jsp, not a mvc View
> instance. Basically I have some beans in a flow-scoped application
> context.
> Because the AC is in flow scope, I can access it like this from view
> resources participating in the flow. Ideally I'd like to be able to
> invoke
> arbitrary methods on certain beans, like this:
>
> ${transactionContext.transactionCoordinator.amountDeposited}, which would
> translate to: ac.getBean("transactionCoordinator").getAmountDeposited().
>
> Keith
>
> -----Original Message-----
> From: spr...@li...
> [mailto:spr...@li...] On Behalf
> Of
> Juergen Hoeller
> Sent: Wednesday, June 01, 2005 2:58 PM
> To: spr...@li...
> Subject: Re: [Springframework-developer] am I missing something
>
> Keith,
>
> If you define your View instances as beans (using XmlViewResolver or
> ResourceBundleViewResolver), you can wire them with anything you want,
> using
> standard Spring bean references.
>
> However, if you're using a UrlBasedViewResolver, this is not available
> because of the different View instantiation model there. You can do
> ApplicationContext lookups in an ApplicationContextAware view, though.
>
> What concretely do you want to pass to a View instance?
>
> Juergen
>
>
> -----Original Message-----
> From: spr...@li...
> [mailto:spr...@li...]On Behalf Of
> Keith Donald
> Sent: Wednesday, June 01, 2005 2:31 AM
> To: spr...@li...
> Subject: [Springframework-developer] am I missing something
>
>
> Is there an easy way to invoke methods on a bean exported in the Spring
> application context from a view? It'd be quite useful for this app I'm
> building. I reckon I could just stick the service I want to expose into
> the
> model but it'd be cool to have the whole context in there in this case..
> I
> know we also want this capability in web flow definitions as well.
>
> Keith
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
|