aspose file tools
The moose likes JSF and the fly likes parameter passing to Seam backing bean method Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "parameter passing to Seam backing bean method" Watch "parameter passing to Seam backing bean method" New topic
Author

parameter passing to Seam backing bean method

mark weatherill
Greenhorn

Joined: Jan 21, 2006
Posts: 6
Problem statement: i have implemented the RichFaces suggestionbox tag using Java statements in a method of a Seam backing bean. In order to customize its behaviour, i am trying to pass a parameter to the method of the backing bean; the catch is, the method which sets up the suggestionbox is invoked in the Seam bean using the @Create annotation.
The JSF statement is:
<a4jutputPanel binding="#{tabManager.autocompletePanels[tabID]}"/>
The getAutocompletePanels() method just returns an instance of autocompletePanels (a HashMap).
In the Seam backing bean, the annotation is:
@Create
public void afterCreate() {
methodToSetupSuggestionbox();
}
I know it is possible to pass parameters to backing bean methods using a JSF page nested tag like: <f:param name="paramName" value="paramValue"/>, and
then accessing such a request parameter in the bean method using:
FacesContext context = FacesContext.getCurrentInstance();
Map map = context.getExternalContext().getRequestParameterMap();
String paramName = (String) map.get("paramValue");

The problem is how to pass a parameter into the method which is called from the Seam annotation to create an instance of the backing bean when one doesn't exist in the session?

Any useful suggestions gratefully received, otherwise back to the drawing board!
Cheers,

Mark Weatherill.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: parameter passing to Seam backing bean method
 
Similar Threads
JBoss - multiple vagueness
How to pass parameter to JSF backing Bean
SEAM accessing clicked link's object on next page (SOLVED)
A problem about the usage of tag jsp:param
How can I pass html form element values to applet?