ICEfaces
  1. ICEfaces
  2. ICE-2079

the search for the script with id "configuration-script" is incorrect

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.7DR#3, 1.7
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Liferay Portal

      Description

      If the script with id 'configuration-script' is found more than once on the same page(which is a common thing in portal-environment), the line:

      String viewIDScript = "document.getElementById('configuration-script').parentNode.viewIdentifier=" + context.getViewNumber() + ";\n";

      doesn't find the current script hence the view id is incorrectly identified upon submit.

        Activity

        Hide
        Dan Leahu added a comment -

        The solution for this would be to replace that line from the file DOMResponseWriter.java with:

        String viewIDScript = "var scripts=document.getElementsByTagName('script');scripts[scripts.length-1].parentNode.viewIdentifier=" + context.getViewNumber() + ";\n";

        which will search for the last script added(which is always the current script) and set the viewIdentifier on it's parent.

        Show
        Dan Leahu added a comment - The solution for this would be to replace that line from the file DOMResponseWriter.java with: String viewIDScript = "var scripts=document.getElementsByTagName('script');scripts [scripts.length-1] .parentNode.viewIdentifier=" + context.getViewNumber() + ";\n"; which will search for the last script added(which is always the current script) and set the viewIdentifier on it's parent.
        Hide
        Mircea Toma added a comment -

        Fixed by ICE-1675 resolution.

        Show
        Mircea Toma added a comment - Fixed by ICE-1675 resolution.

          People

          • Assignee:
            Unassigned
            Reporter:
            Dan Leahu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: