I need to open a popup from a jsf page. I tried with h:commandlink. it is working, but i m getting the old values displayed in the popup.
Actually what i am doing is that-- My application has a datatable and one column has h:commandlink (Status: Assinged/Unassinged) on click on that i need to interact with database and open a popup which will show the details of the particular Assinged user. in the popup in a tabular format.
i m getting the popup on clicking the Status link, but i m getting the old values displayed in the popup. i m getting the right results if i m clicking that link again.
So, how can i get the right results in one click only ???
I think, on clicking the link popup is displayd first & the method to get user details from the database is executed next.
How can i implement these in JSf.
Thanks in advance.
Joined: Dec 05, 2008
If you are using the same popup for all links, then reset the values in the popup when you are closing it. It might work!
Joined: Jan 03, 2009
thanks a lot 4 the reply.
now, i am getting the popup;
but, first time i m getting the blank popup, on pressing F5 button i m getting the popup populated with values.
so, how can i get the popup populated with values in the first click only.
waiting 4 your quick response....
thanks in advance.
Joined: Dec 05, 2008
Can you share your code where you have problem with? So that I can quickly review and help you on this.
Joined: Dec 30, 2005
If you are trying to open Popup on link click try to use <h: outputLink> instead of <h:commandLink> and use onclick event to open Popup....
Does any one know solution to this problem. I too am facing similar problem.
I have a page with data table --- I open a new modal dialog window (window.showModalDialog) on click of menu item on a page --> It opens the page to view details of the selected item --- When I close it and select different row of the table(in the first page) and open to see the details it shows the previous data.
The data on the form fields are populated from a backing bean which is session scoped. I am sure the backing bean is updated with new data(checked it while debug ). Only that it is not displayed/refreshed in the page rendered.
Thanks for your time and hoping to get your feedback on this.