Opening New Window on button click

Hi all,

On click of a <h:commandButton> i want to display a new window which is containing datatable. Is there any possible way to do this with out using javaScript? Is there any possible way of doing it inside bean?

If javascript is the only way tell me how to do that.

Thanks...

[309 byte] By [JayKVa] at [2007-11-27 11:38:57]
# 1

If you want to do it without Javascript, use links instead of buttons. A bean or a servlet cannot push a new window. Using Javascript it's fairly simple:onclick="window.open('foo.jsp');"

BalusCa at 2007-7-29 17:23:12 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

You can do this with buttons by using the target attribute of the form component and setting it to "_blank" ( http://www.w3.org/TR/html4/types.html#type-frame-target).

RaymondDeCampoa at 2007-7-29 17:23:12 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

This may be useful:

http://wiki.apache.org/myfaces/JavascriptOpenNewWindow

orribla at 2007-7-29 17:23:12 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...