| Author |
How can I open a JSF page as a non modal dialog
|
S Giri
Greenhorn
Joined: Aug 07, 2008
Posts: 3
|
|
Hi, <b>I am trying to open a new jsf page with following code</b> <code>FacesContext context = FacesContext.getCurrentInstance(); ViewHandler vh = context.getApplication().getViewHandler(); UIViewRoot dialog = vh.createView(context, "/pages/report1.xhtml"); AdfFacesContext a = AdfFacesContext.getCurrentInstance(); HashMap props = new HashMap(); HashMap params = new HashMap(); System.out.println("--here---"); // just a try, component is nothing by a CoreCommandLink of adf component.getAttributes().put("target", "_new"); params.put("str", str); props.put("width", 500); props.put("height", 700); a.launchDialog(dialog, params, component, true, props);</code> above code opens page in new window, but the parent window is now not accessible unless you close the newly opened window please help if I am missing anything Thank you, san_sim
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56540
|
|
"san_sim", There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it. In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Thanks! bear JavaRanch Sheriff
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Venkat Sadasivam
Ranch Hand
Joined: May 10, 2008
Posts: 139
|
|
You can use window.open() javascript function to open another window. http://www.javascript-coder.com/window-popup/javascript-window-open.phtml
|
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
|
 |
S Giri
Greenhorn
Joined: Aug 07, 2008
Posts: 3
|
|
Yhank you Venkat... Yes I have kept JavaScript as my last option. Thanks again for help
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
"San G", Welcome to JavaRanch! We're pleased to have you here with us here on the ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it. In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Initials are OK for the first and middle names but not the last. You can change it here
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14572
|
|
|
I'd provide info, but not until you fix your display name.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
S Giri
Greenhorn
Joined: Aug 07, 2008
Posts: 3
|
|
I have already update my display name to "S Giri" [ September 17, 2008: Message edited by: S Giri ]
|
 |
Jacob Jones
Greenhorn
Joined: Jun 23, 2009
Posts: 1
|
|
|
Removed.
|
 |
 |
|
|
subject: How can I open a JSF page as a non modal dialog
|
|
|