ICEmobile
  1. ICEmobile
  2. MOBI-197

inline JavaScript included once for each dependent component type

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 Final
    • Fix Version/s: EE 1.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      ICEmobile

      Description

      Inline JavaScript must be written once if any dependent components are on the page.

        Activity

        Ted Goddard created issue -
        Ted Goddard made changes -
        Field Original Value New Value
        Assignee Steve Maryka [ steve.maryka ] Ted Goddard [ ted.goddard ]
        Hide
        Ted Goddard added a comment -

        If the presence of the component is not detected correctly, the inline JavaScript may be written more than once or not written at all. In the case of mobileshowcase, the following sequence causes the inline script for the button to not be written:

        1. Load menu page (GET)
        2. Select Buttons demo (AJAX)
        3. Press Menu button (AJAX)
        4. Change theme (POST)
        5. Select Buttons demo (AJAX)

        Buttons will not work at this point. The problem is that 2. marked the button JavaScript as rendered in the ViewMap, but 4. preserved the ViewMap while clearing the JavaScript memory in the browser. The current state-machine implementation did not take full-page POST into account, only GET and AJAX requests.

        Show
        Ted Goddard added a comment - If the presence of the component is not detected correctly, the inline JavaScript may be written more than once or not written at all. In the case of mobileshowcase, the following sequence causes the inline script for the button to not be written: 1. Load menu page (GET) 2. Select Buttons demo (AJAX) 3. Press Menu button (AJAX) 4. Change theme (POST) 5. Select Buttons demo (AJAX) Buttons will not work at this point. The problem is that 2. marked the button JavaScript as rendered in the ViewMap, but 4. preserved the ViewMap while clearing the JavaScript memory in the browser. The current state-machine implementation did not take full-page POST into account, only GET and AJAX requests.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #28423 Tue Mar 20 13:25:38 MDT 2012 ted.goddard clearing map of component markers in viewMap upon each non-ajax page render, writing containing span for each javascript resource (MOBI-197)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/components/component/resources/icefaces.ace/META-INCLUDE/faces-config.xml
        Commit graph ADD /icemobile/trunk/icemobile/samples/mobileshowcase/src/main/webapp/showcase_small.xhtml
        Commit graph MODIFY /icemobile/trunk/icemobile/components/component/src/org/icefaces/mobi/renderkit/CoreRenderer.java
        Commit graph ADD /icemobile/trunk/icemobile/components/component/src/org/icefaces/mobi/renderkit/InlineScriptEventListener.java
        Ted Goddard made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Ted Goddard added a comment -

        The fix makes use of a map of marker values kept in the viewMap, cleared upon every non-Ajax page render.

        Show
        Ted Goddard added a comment - The fix makes use of a map of marker values kept in the viewMap, cleared upon every non-Ajax page render.
        Migration made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Ted Goddard
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: