Open a url in a new window in the backing bean

Hi to all
How can i open a website like google in a new window, but via Backing Bean??
thanks to everyone in advance.

use javascript..
FacesContext facesContext = FacesContext.getCurrentInstance();
ExtendedRenderKitService service =
(ExtendedRenderKitService)Service.getRenderKitService(facesContext,
ExtendedRenderKitService.class);
service.addScript(facesContext, "window.open(http://www.google.coml)");

Similar Messages

  • Openning an URL in a new window when the page is submitted, from a pl/sql p

    Hi,
    What I want to do is a procedure (called by an apex process) that opens a new window browser at the URL defined in the procedure.
    I have tried with the following procedure:
    create or replace procedure reportes (par1 NUMBER, par2 NUMBER)
    BEGIN
    htp.htmlOpen;
    htp.headOpen;
    htp.title('Reporte SAF - .: SINERWARE - 2008:.');
    htp.headClose;
    htp.bodyOpen;
    htp.area('0,0,200,400', 'rect', '200.31.86.173/Orden_pedido.jsp?centro_costo='||par1||'&orden_inicial='||par2, NULL, '_blank');
    htp.bodyClose;
    htp.htmlClose;
    END;
    Thanks for any comment.
    Alejandro T.

    I assume your are writting an applet. You can do this by adding a little Javascript to your HTML page. Add this to the HEAD section:
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
      function openURL(url) {
        window.open( url, "", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes" );
      } //end openURL
    // End -->
    </SCRIPT>Execute the Javascript using showDocument():
    String url = "http://somewhere.com/" ;
    try {
      getAppletContext().showDocument((new URL("javascript:openURL(\"" + url +"\")"));
    } catch (MalformedURLException me) {
    } //end try

  • Captivate 7 Click box and bottons not able to open an URL on a new window

    I inserted a button and a click box in CP7 to open an URL on a new window. The URL opens but in a New Tab. There is an issue that the URL cannot be opened on a NEW WINDOW, I am using IE and Chrome. Do you have any ideas about this issue and how to troubleshoot it? I tried with Safari and it works fine.
    Thanks, Jorge - Adobe Captivate 7 user.

    Hi Jorge
    It's my understanding that all you can do is to configure the link to open in a new "whatever". Whether you get the link opening in a tab or a window is left up to the browser and how the particular user has their browser configured. For example, I use Firefox and when I look at its settings here is what I see.
    I'm guessing there must be a way to force a new window, because I do see new windows appear. But I think in those cases folks are doing it by using JavaScript.
    Cheers... Rick

  • Open a URL in a new window from Flash

    Looking for the simplest way to open a URL in a new window from Flash using AS3-CS3, Thank you.

    The following line of code will do that...fill in the URL
    navigateToURL(new URLREquest("http://www....", "_blank"));

  • How do I open a playlist in a new window with the new version 11.01

    How do I open a playlist in a new window with the new version 11.01

    I use playlists a LOT to organize my music. It is extremely important to me to be able to open playlists in their own wondows. I am upset to see this feature removed. Please enable this functionality as soon as possible.

  • Dragging an existing tab to the desktop (or below tab bar) does not open that URL in a new window, only a new window with an empty tab. FF4 RC2 (did it with RC1 as well).

    When I drag an existing open tab from the FF4 tab bar onto my desktop, a new window opens as expected but the tab within that window does not load the URL of the tab dragged from the previous window. The tab menu item "Move to New Window" does the same thing as well.
    I have disabled Tab Mix Plus add-on but it has made no difference. Is there a setting somewhere that I am missing?

    I use Tab Mix Plus and do not have that problem.
    <br/>
    You may need to try Firefox Safe Mode to see if an add-on is causing the problem; see: http://kb.mozillazine.org/Safe_Mode
    *<u>In Firefox 4, to enter Safe Mode, hold the Shift key while clicking on the Firefox 4 desktop icon.</u>
    *Firefox Safe Mode is a diagnostic mode that disables Extensions and some other features of Firefox. If you are using a theme, switch to the DEFAULT theme: Tools > Add-ons > Themes '''<u>before</u>''' starting Safe Mode. When entering Safe Mode, do not check any items on the entry window, just click "Continue in Safe Mode". Test to see if the problem you are experiencing is corrected.
    * If the problem does not occur in Safe-mode then disable all of your Extensions and Plug-ins and then try to find which is causing it by enabling '''<u>one at a time</u>''' until the problem reappears. '''<u>You MUST close and restart Firefox after EACH change</u>''' via File > Restart Firefox (on Mac: Firefox > Quit). You can use "Disable all add-ons" on the Safe mode start window.
    * See the following for more information
    ** http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes
    ** http://support.mozilla.com/en-US/kb/Troubleshooting+plugins
    ** http://support.mozilla.com/en-US/kb/Basic+Troubleshooting

  • Opening a url in a new window

    Guys,
    I have a situation to open a url (url is formed dynamically) in a new window on the click of a button (command button).
    I tried to use Go button, but in go button there is no way to provide the url dynamically. I mean i form the url by reading the contents of the page. But go button doesnt allow to form the URL dynamically.
    The problem with command button is, it doesnt open the URL in a new window.
    My requirement is
    i click on the button on a page -> go to method (read the contents of the page) to form the URL -> open the URL in a new window
    How this can be acheived.

    Yes, but i need a method to do my calculation to build the dynamic URL.
    I have resolved it using command button
    public void actionlistener(actionevent event)
    String dynamicUrl = // logic to build url;
    FacesContext ctx = FacesContext.getCurrentInstance();
    ExtendedRenderKitService erks =
    Service.getService(ctx.getRenderKit(), ExtendedRenderKitService.class);
    String url = "window.open('" + dynamicUrl + "','_blank');";
    erks.addScript(FacesContext.getCurrentInstance(),url);
    this resolved my issue

  • Open a picture in a new window without the diashow-browser ?

    I've already seen it on some pages but i don't know how to do this.
    Is there any trick ?
    thanks

    Are you publishing to .Mac or to a local folder? When you use .Mac, clicking on a thumbnail on a Photo page opens that image in a new window and you only see the slideshow when you click the Start Slideshow button. If you publish to a local folder and then upload to a non-.Mac server, the old HomePage slideshow opens when you click a thumbnail. You can change the non-.Mac slideshow by following the advice in this excellent tip: http://discussions.apple.com/thread.jspa?threadID=313201&tstart=0. (The slideshow recommended there, though, also launches when you click a thumbnail.)

  • Opening a URL/File in new window instead of new tab

    I think I know the answer to this, but I'd like to check anyway.  When setting an action to Open URL or File for a button/click box/hyperlink/etc, is there a setting in Captivate to open the URL/File in a new WINDOW instead of a new TAB? I know to use the "New" setting along with the Open URL or File action. I assume opening in a new window instead of a new tab by default is going to depend on the settings of whatever browser you use, but like I said, just wanted to check. Thanks!

    If you open it in javascript and specify a height/width or location it should open in a new window.
    window.open("http://www.adobe.com", "_blank", "toolbar=yes, scrollbars=yes, resizable=yes, top=500, left=500, width=400, height=400");

  • Why can I not open a URL in a new window

    In older versions of Firefox I could right click on a URL and then select "Open Link in new Window" and a new window would open to display the information. In newer versions, V5 or later, if I select "Open Link in New Tab" the new information will be displayed in a new tab, if I click on "Open Link in New Window" all I get is a new window with two blue bars across the top a "New Tab" and an empty window, no information is displayed.

    Try the Firefox SafeMode to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4/5/6/7 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    If it is good in the Firefox SafeMode, your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • Open external URL in a new window

    I have a button to show information from another site but i would like to show this info in a new window
    www.octa.info
    click on (vergoedingen zorgverzekeringen)
    David

    You'll have to modify the corresponding HTML file on your .Mac disk and change the anker-tag. This change must be made after every update of your site...
    Just have a look at
    http://discussions.apple.com/thread.jspa?threadID=339861
    Bye, Matthias

  • Opening a report in a new window on the web

    Hi I am displaying crystal reports using Tomcat and I am trying to get the hyperlink>&#39;A website on the internet&#39; to open up in a new window. At the moment it just opens up in the current window. This seems like it should be something very easy.

    This is my link in a web page.
    http://the web server name/businessobjects/enterprise115/desktoplaunch/opendoc/openDocument.jsp?iDocID=okcwr4UADs7mAVYAMw6D5nGBEQY&sIDType=CUID&sType=rpt&sReportName=TEST_Requisition&sRefresh=Y
    But on click this link throws the below error.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: SSO Script: Header employeeid does not have a value associated with it. It is null, which probably means no such HTTP header exists
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.InfoView.logon.logon_jsp._jspService(logon_jsp.java:244)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         com.crystaldecisions.ePortfolio.framework.common.AutoWrapExceptionAction.process(AutoWrapExceptionAction.java:83)
         com.crystaldecisions.webapp.struts.framework.AbstractEnterpriseAction.perform(AbstractEnterpriseAction.java:38)
         org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
         com.crystaldecisions.webapp.struts.framework.CrystalUTF8InputActionServlet.process(CrystalUTF8InputActionServlet.java:29)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.Exception: SSO Script: Header employeeid does not have a value associated with it. It is null, which probably means no such HTTP header exists
         org.apache.jsp.InfoView.logon.logon_jsp._jspService(logon_jsp.java:143)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         com.crystaldecisions.ePortfolio.framework.common.AutoWrapExceptionAction.process(AutoWrapExceptionAction.java:83)
         com.crystaldecisions.webapp.struts.framework.AbstractEnterpriseAction.perform(AbstractEnterpriseAction.java:38)
         org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
         com.crystaldecisions.webapp.struts.framework.CrystalUTF8InputActionServlet.process(CrystalUTF8InputActionServlet.java:29)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.27 logs.

  • Open a new window of the brosewr in a pl/sql portlet

    I am designing a pl/sql portlet that the inserted thing in a page of portal and that on having executed opens the page of beginning of an own application of my organization.
    I want to open this page in a new window of the mariner(browser) but that father remains the area in the page.
    Since I can do this?

    siply add some javascript code that "window.open" in your portlet.

  • Open URL in a new window

    I have a project slide with buttons that open a URL that points to the .htm project file for another project in a new window with the current project to stay running.  This causes the course to close completely in the LMS?

    Hi,
    try setting the button to open the url in a new window, that way the students will not have to "start over" when they need to go back to the module.
    Just go into your button properties and next to your url, click the down arrow and select new.  This will open the url in a new window.  You can uncheck the continue playing move choice also to stop the movie so it doesnt continue to play when the user is visiting the webpage.

  • Open URL in a new window by closing the parent window

    Hi Friends,
    Is there any option to open URL in a new window by closing the parent window on a button click?
    Already implemented the logics suggested in /people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications , the thread ' URL in same window '  and the standard component WDR_TEST_EXIT_PLUG .But button is not triggerring any actions .plz help me  ..............
    Regards,
    Radhika

    hi,
    Do the following steps :
    -> Make an Outbound Plug to the Window.
    ->Make the type of Outbound plug to Exit Type.
    ->Add URL of type String as a parameter to the outbound plug of Window.
    ->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of window from view wont b possible ).
    To open a new URL with closing the previous one write this Code in OnAction of Button : ( this Code can be get from Code Wizard too ).
    DATA lo_zexit TYPE REF TO ig_zexit .   <zexit is name of my Component>
    lo_zexit =   wd_this->get_zexit_ctr( ).
      lo_zexit->fire_out_window_plg(
        url =   'http://www.google.com'                            " string
    I hope it helps.
    Thanx.

Maybe you are looking for

  • Open a pdf file in OAF..please help urgent !!!!!!!!!!!!!!!!!!!!!!!

    Hi , I have a requirement in OAF page. There is a table region in my OAF Page which has multiple rows of data. and then I have a button. Once I click on the Button , a PDF file should open which has the complete details of this table region Please le

  • Site definition not saved after closing DW

    I moved my copy of DW to a new computer. I exported the site definitions from the old computer and used the Import option in Manage Sites to restore them on the new computer. It brought them all over just fine. When I tried to update a site, though,

  • All Letter Keys Stop Working

    this has happened to me twice this week. and i don't know what is causing it. i will be in the middle of working and all of a sudden all the letter keys stop working (i.e. i can't type anything) However, the mouse still works, the arrow keys still wo

  • CS4 Print Presets --- CS5?

    Are ID CS4 print presets compatible with CS5 and if so, how do I make the transfer?

  • Should have the server "on" all the time?

    Hi, I would like to know if I have to leave my computer on all the time if I put the serveur solution on my computer? Or do we have a kind of cloud solution with it? Many thanks for your help. Manu