Friends,
I have a search form created using
JSF tags. In this form we have 7 buttons performing unique operations on the search form page.
The problem is, when I come to this page for the 1st time and click on an any of the button. The page is submitted but no action is performed and the page returns back with the same data. When I click the same button for the second time. The action method is invoked and I am getting the expected result.
I went through the couple of forum posting that talks about it this issue but the solution mentioned in that threads did not work for the problem I am facing.
For your information,
1. I am coming to this search page from my home page.
2. We are using tiles with JSF
3. We have 1custom JSF tags in the search page.
I found the reason. In our
JSP page we are having 3 dropdown list box and each of the them attached to respective binding method to perform business logic. At the end of the method, we are adding the below line:
FacesContext.getCurrentInstance().renderResponse();
When we comment this line, and execute the page and press any buttong, the binding method associated with the button is invoked.
Where as when I change the value in the dropdown list box, it invokes the associated binding method for the dropdown list box and it does not comes back to the same page but navigates to some other page.
Is there any way to solve this problem without commenting the FacesContext.getCurrentInstance().renderResponse(); line and make the button to submit on 1st time click.
Your inputs will be appreciated.
Advance thanks
Prakash