ICEfaces
  1. ICEfaces
  2. ICE-11066

JavascriptContext calls not working after new window opened

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: EE-1.8.2.GA_P07, EE-1.8.2.GA_P08
    • Fix Version/s: EE-1.8.2.GA_P09
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      All

      Description

      The JavascriptContext.addJavascriptCall() method is being used to call some JavaScript from the server. This script is to open a new browser window via the window.open() script.

      This call is working on the first call but no longer on subsequent calls/clicks. The actual method is not being called either.

      Calling the same JS script on the client side (onclick event) doesn't reproduce this issue.

      Testing in Firefox I see a "no element found" js error being thrown. I don't see any errors in other browsers though.

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case that shows this issue.

        Steps:

        • Load welcomeICEfaces.iface
        • Click the "Test JS - Server" button. A new window should be opened.
        • Click this button again, a new window should open again but it does not. The following should be shown in the server logs as well "Test Script".
        • Doing the same steps with the Client button, this issue isn't reproducible.
        Show
        Arran Mccullough added a comment - Attached test case that shows this issue. Steps: Load welcomeICEfaces.iface Click the "Test JS - Server" button. A new window should be opened. Click this button again, a new window should open again but it does not. The following should be shown in the server logs as well "Test Script". Doing the same steps with the Client button, this issue isn't reproducible.
        Hide
        Arran Mccullough added a comment -

        Add in a counter to my sample to see if that helped to get the updates shown but no change was seen. The first update is as follows:

        <updates><update address="j_id7:j_id13" tag="span"><attribute name="class"><Unable to render embedded object: File ([CDATA[iceOutTxt]]></attribute><attribute name="id"><) not found.[CDATA[j_id7:j_id13]]></attribute><content><Unable to render embedded object: File (1:dynamic-code" tag="script"><attribute name="id"><) not found.[CDATA[M4iS_FdU_xtDU_JW1bO6QA:1:dynamic-code]]></attribute><attribute name="type"><Unable to render embedded object: File ([CDATA[text/javascript]]></attribute><content><) not found.[CDATA[window.open('window.iface'); //#

        {testBean.num}

        ;Ice.Focus.setFocus('j_id7:j_id8');//-1884519940]]></content></update></updates>

        The second click is as follows:

        <updates><update address="M4iS_FdU_xtDU_JW1bO6QA:1:dynamic-code" tag="script"><attribute name="id"><Unable to render embedded object: File (1:dynamic-code]]></attribute><attribute name="type"><) not found.[CDATA[text/javascript]]></attribute><content><![CDATA[Ice.Focus.setFocus('j_id7:j_id8');//685312109]]></content></update></updates>

        This is also specific to the window.open script. Using an alert script, it doesn't happen (this is commented out in my sample).

        Show
        Arran Mccullough added a comment - Add in a counter to my sample to see if that helped to get the updates shown but no change was seen. The first update is as follows: <updates><update address="j_id7:j_id13" tag="span"><attribute name="class">< Unable to render embedded object: File ([CDATA[iceOutTxt]]></attribute><attribute name="id"><) not found. [CDATA [j_id7:j_id13] ]></attribute><content>< Unable to render embedded object: File (1:dynamic-code" tag="script"><attribute name="id"><) not found. [CDATA [M4iS_FdU_xtDU_JW1bO6QA:1:dynamic-code] ]></attribute><attribute name="type">< Unable to render embedded object: File ([CDATA[text/javascript]]></attribute><content><) not found. [CDATA[window.open('window.iface'); //# {testBean.num} ;Ice.Focus.setFocus('j_id7:j_id8');//-1884519940]]></content></update></updates> The second click is as follows: <updates><update address="M4iS_FdU_xtDU_JW1bO6QA:1:dynamic-code" tag="script"><attribute name="id">< Unable to render embedded object: File (1:dynamic-code]]></attribute><attribute name="type"><) not found. [CDATA [text/javascript] ]></attribute><content><![CDATA [Ice.Focus.setFocus('j_id7:j_id8');//685312109] ]></content></update></updates> This is also specific to the window.open script. Using an alert script, it doesn't happen (this is commented out in my sample).
        Hide
        Mircea Toma added a comment - - edited

        This issue is invalid. The test application needs to be configured with com.icesoft.faces.concurrentDOMViews=true context parameter to ensure that the parent window is differentiated (by ICEfaces) from the pop up window.

        Show
        Mircea Toma added a comment - - edited This issue is invalid. The test application needs to be configured with com.icesoft.faces.concurrentDOMViews=true context parameter to ensure that the parent window is differentiated (by ICEfaces) from the pop up window.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: