how open new browser in JSF after executing backing bean method

hi All,

Can you please tell me how to open a new browser after executing action method in bean.

I have writen one java script function, i am passing the string url which i got from the backing bean action method.

First of all i want to execute action method then only javascript function.

waiting for your quick reply.

thanks & regards

bhushanam.

[393 byte] By [Java_Smarta] at [2007-10-3 1:48:33]
# 1
edit: wrong thread, sorry.Message was edited by: BalusC
BalusCa at 2007-7-14 18:46:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
how about a h:commandLink?<h:commandLink action="#{myBean.myAction}" value="www.blah.com" target="_blank"><f:verbatim></f:verbatim></h:commandLink>
mulderbabaa at 2007-7-14 18:46:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

hi,

That command link in data table. The requirement is like this:

I have datatable, the columns are

1) <h:selectBooleanCheckbox ....

2) ><h:commandLink ....

requirement 1:

if user select the boolean check box and click the command link

then I want to execute the backing bean action method , it returns string url and show in new browser window( popup window with toolbar ).

requirement 2:

if user not select the boolean check box and click the command link then I want to excute the backing bean action method, it returns string url and show in the same browser ( through navigation rule we can show that page.)

Please look the below command link code.......

><h:commandLink id="belegnr" onmousedown="return showPopupWindowForInvoiceForGraphicImage( '#{row.importKz}', '#{row.blnChecked}', '#{InvoiceMecBoxBean.printInvoiceFilePath}');" styleClass="input" style="color:blue" value="#{row.belegnr}" action="#{InvoiceMecBoxBean.editLinkAction}"/>

Can u please give me the idea istead of command link can we use outputlink to fullfil the requirement?. Or any suggestion please......

Here in my case commandlink value is differenet and after action the return value is different to show in new window. that is problem here.

thanks & regards

bhushanam.

Java_Smarta at 2007-7-14 18:46:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
you can't use outputLink instead of commandLink. It doesnt have method binding for an action. It just renders an href to output.you can also bind an e.l. to target in commandlink to decide whether it will be a popup or something else..
mulderbabaa at 2007-7-14 18:46:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

hi,

both the target="_new" and target ="_blank" not working for opening new browser window.

Can any body know the solution please.

<h:commandLink id="belegnr"styleClass="input" style="color:blue" value="#{row.belegnr}" action="#{InvoiceMecBoxBean.editLinkAction}" target="_new" />

thanks & regards

bhushanam.

Java_Smarta at 2007-7-14 18:46:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...