Thanks lots for your explaination and the snipet Cagatay, I'll get rid of
jsf-spring... However my issue here seems to be that in my specific case (the
inputSuggestAjax component), the callback method specified by the attribute
suggestedItemsMethod of the tag must be a method with the following prototype:-
public List getAListToFillSuggestions(String keyword) {
...
}
Note that the FacesContext is not an argument of this method, and I have no
idea on how to get an handle on it ... any idea? I am stuck ...
Thanks
________________________________
From: Cagatay Civici [mailto:[EMAIL PROTECTED]
Sent: mercredi 20 juin 2007 23:47
To: MyFaces Discussion
Subject: Re: get a Spring bean in one of my AJAX component (e.g.
inputSuggestAjax)
Hi,
Actually I prefer spring's builtin stuff for jsf integration and think of
jsf-spring a bit unnecessary dependency.
Anyway you can try spring's FacesContextUtils;
http://www.springframework.org/docs/api/org/springframework/web/jsf/FacesContextUtils.html
Use as;
FacesContextUtils
.getWebApplicationContext(FacesContext.getCurrentInstance())
.getBean("sopranoBean");
Regards,
Cagatay
On 6/21/07, Jérôme Iffrig <[EMAIL PROTECTED]> wrote:
Hi,
The following question may sound very specific and not really related to
MyFaces, but it would help me answer a question I have troubles to
formulate
...
How can I access my Spring beans from the method defined as my
suggestedItemsMethod method in a "s:inputSuggestAjax" component?
Note, if it helps, that I use jsf-spring as my glue between Spring and
MyFaces. It works great, but not for such Ajax components...
Thanks
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/