| Author |
open new browser window on click of button.
|
swapnel surade
Ranch Hand
Joined: Mar 05, 2009
Posts: 129
|
|
hi,
on click of h:commandButton I have to open new window and show the result in dat window.
How to open new window on button click.
thanks
|
 |
Shivaji Byrapaneni
Greenhorn
Joined: Oct 20, 2008
Posts: 22
|
|
|
go for onClick javascript event and call window.open with the required URL.
|
Thanks & Regards,<br />Shivaji Byrapaneni.
|
 |
Eric Härtel
Greenhorn
Joined: Jun 08, 2009
Posts: 8
|
|
Try to avoid popups. It's a question of style. Furthermore, there are popupblocker what may block your window. I hate popups. Is there really a reason not to show your result in the window you have?
|
 |
swapnel surade
Ranch Hand
Joined: Mar 05, 2009
Posts: 129
|
|
I have to call the action of commandButton in new window....
I have written the following code
window.open('popup.faces', 'popupWindowName', 'dependent=yes');
<h:commandButton action="#{reportBean.execute}" styleClass="buttonN" value="#{msg.report_exportreport_btnlabel}" onclick="openNewWindow();"/>
but I want the action to performed in the newly open page.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14572
|
|
|
Actions aren't performed "in" pages, they're performed "on" backing beans. Whether the page that's navigated to is in the same window or another one is a different matter. However, in my browser configuration, popup pages are either suppressed or open in invisible tabs, so design accordingly.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: open new browser window on click of button.
|
|
|