jsf - Search multiple beans with one input text -


I want to use a h: inputText to call search methods in multiple beans The user is asked to type a name in h: inputText , location is a variable in all the beans, then every search method can then record with the criteria. is.
The questions are first: How can I call multiple beans methods from h: input text and without h: command button button ? Second: How do I redirect to a search page after all the results of the bean names after the user has entered?

me h: inputText without h: command button but how do I say more than one bean and how do i search_results.xhtml Redirect to the page?

I am using JSF 2.2

Update
I have written the written code but I do not know how to set the renderer feature So that it redirects the search.xhtml page I have set it to space which is the input text ID and reloads the page.

  & lt; H: inputText id = "place" value = "# {bean. Place}" onkeypress = "if (event.keyCode === 13) {onchange (event); return back;}" onchange = "return event.keyCode! == Undefined "& gt; & Lt; F: Ultimate Name = "Location" value = "# {Bean.}}" /> & Lt; F: ajax listener = "# {bean.goosto search}" render = "location" /> & Lt; / H: inputText>  

goToSearch ():

  public string goToSearch (AjaxBehaviorEvent event) {return "Search.xhtml? Faces-redirect = true & includeViewParams = true"; }  


Comments