• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I open a JSF page as a non modal dialog

 
S Giri
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Venkat Sadasivam
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use window.open() javascript function to open another window.

http://www.javascript-coder.com/window-popup/javascript-window-open.phtml
 
S Giri
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yhank you Venkat...
Yes I have kept JavaScript as my last option.

Thanks again for help
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd provide info, but not until you fix your display name.
 
S Giri
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have already update my display name to "S Giri"
[ September 17, 2008: Message edited by: S Giri ]
 
Jacob Jones
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Removed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!