Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get the param value to backing bean method???  RSS feed

 
gopal kishan
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using commandLink, and i am passing a param value for that.
<h:commandLink id="submit" action="#{searchForm.test}">
<f aram id="triggerId" name="triggerId" value="#{event.triggerId}" />
<h utputText value="Details"/>
</h:commandLink>

how to get the triggerId in my backing bean 'test' method.

And the
scope
for the searchForm is
session


thanks in advance
Kishan
 
Narendran Nair
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


copy the getParameter to the desired type
use this code in the backing bean ... thats all .........

regards
Narendran J S
 
Gerardo Tasistro
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This should work to by getting the bean out of the session.

FacesContext context = FacesContext.getCurrentInstance();
HttpServletRequest myRequest = (HttpServletRequest)context.getExternalContext().getRequest();
HttpSession mySession = myRequest.getSession();

EventType event=(EventType)mySession.getAttribute("event");
String trigger=event.triggerID;

Haven't tried it though.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!