aspose file tools
The moose likes JSF and the fly likes passing values from jsf to popup Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "passing values from jsf to popup" Watch "passing values from jsf to popup" New topic
Author

passing values from jsf to popup

Teena Malkani
Greenhorn

Joined: Jul 30, 2008
Posts: 1
Hi All,
I have a JSF which contains 1 link ..on clicking that link...popup window should open and some values which are present on main jsf need to be sent to popup window.

Please suggest me the way for that.

thanks in advance
Srinivas Krishnamoorthy
Greenhorn

Joined: Jul 28, 2008
Posts: 5
Write a normal JSF forward method to transfer data to the page bean of the pop-up page and return the mapping forward to the pop-up page (Till this point the code should be a complete one to open the page in the same window)

to open the popup use javascript function given below. Call the function in the onmousedown method of the link, popUpScreen('viewbase',this).

The first parameter is just a unique string.

function popUpScreen(targetScreenName,hyperlinkObject) {
newwindow = window.open('',targetScreenName, "height=450,width=650");
if (window.focus) {newwindow.focus()}
document.forms[0].target = targetScreenName;
hyperlinkObject.onclick();
document.forms[0].target = "";
}
Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
To pass values to popup screen you have to follow the traditional way of sending through query string as part of the url.

You can use FacesContext.getRequestParamMap().get("RequestKey"); to fetch the query string value.


“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing values from jsf to popup
 
Similar Threads
Passing parameter to a popup window in JSF
Window.opener problem
how to close a popup window
post data from one window to another
I need to open a popup from a jsf page.