ICEfaces
  1. ICEfaces
  2. ICE-8970

DOM update of whole body affects states of jQuery component manager singleton

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      *
    • Assignee Priority:
      P1

      Description

      jQuery datepicker has singleton manager. Manager initialized on jQuery UI JS load. It has states pointing to HTML, at end of body in this case. (?) Update of body without manager knowing causes it to break.
      1. Document12.txt
        69 kB
        yip.ng
      1. screenshot-01.png
        272 kB
      2. screenshot-02.png
        324 kB
      3. screenshot-03.png
        261 kB
      4. screenshot-04.png
        320 kB

        Issue Links

          Activity

          Hide
          Mircea Toma added a comment - - edited

          Instead of using DIVs to avoid having the body element updated it is better to use h:panelGroup-s instead. This way the *_fixviewstate elements will be rendered at the same DOM tree level with the forms their scripts decorate.

          <?xml version='1.0' encoding='UTF-8' ?>
          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml"
          	xmlns:ui="http://java.sun.com/jsf/facelets"
          	xmlns:h="http://java.sun.com/jsf/html"
          	xmlns:ace="http://www.icefaces.org/icefaces/components"
              xmlns:icecore="http://www.icefaces.org/icefaces/core">
          <h:head>
          	<title>#{title}</title>
          	<link rel="stylesheet" type="text/css"
          		href="./resources/css/template.css" />
              <icecore:config mandatoryResources="linkButton dateTimeEntry dataTable dialog tabSet"/>
          </h:head>
          <h:body>
          	<h:panelGroup style="display: block;" class="header" align="center">
          		<ui:insert name="header">#{companyName}</ui:insert>
          	</h:panelGroup>
          	<h:panelGroup style="display: block;" class="topMenu">
          
          		<ui:insert name="menuItems" />
          
          	</h:panelGroup>
          	<h:panelGroup style="display: block;" class="contentBody">
          
          		<ui:insert name="tabItems" />
          
          	</h:panelGroup>
          </h:body>
          </html>
          

          In my opinion a fix should be still found for the ace:dateTimeEntry component because body element updates are quite valid and are handled well both in Mojarra and Myfaces.

          Show
          Mircea Toma added a comment - - edited Instead of using DIVs to avoid having the body element updated it is better to use h:panelGroup-s instead. This way the *_fixviewstate elements will be rendered at the same DOM tree level with the forms their scripts decorate. <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > <html xmlns= "http://www.w3.org/1999/xhtml" xmlns:ui = "http://java.sun.com/jsf/facelets" xmlns:h = "http://java.sun.com/jsf/html" xmlns:ace = "http://www.icefaces.org/icefaces/components" xmlns:icecore = "http://www.icefaces.org/icefaces/core" > <h:head> <title> #{title} </title> <link rel= "stylesheet" type= "text/css" href= "./resources/css/template.css" /> <icecore:config mandatoryResources= "linkButton dateTimeEntry dataTable dialog tabSet" /> </h:head> <h:body> <h:panelGroup style= "display: block;" class= "header" align= "center" > <ui:insert name= "header" > #{companyName} </ui:insert> </h:panelGroup> <h:panelGroup style= "display: block;" class= "topMenu" > <ui:insert name= "menuItems" /> </h:panelGroup> <h:panelGroup style= "display: block;" class= "contentBody" > <ui:insert name= "tabItems" /> </h:panelGroup> </h:body> </html> In my opinion a fix should be still found for the ace:dateTimeEntry component because body element updates are quite valid and are handled well both in Mojarra and Myfaces.
          Hide
          yip.ng added a comment -

          Exactly what I had suggested to the user already: http://www.icesoft.org/JForum/posts/list/15/21571.page#76211.

          Show
          yip.ng added a comment - Exactly what I had suggested to the user already: http://www.icesoft.org/JForum/posts/list/15/21571.page#76211 .
          Hide
          Ted Goddard added a comment -

          Please explain in additional detail how the body tag is being used – is there code that has a reference to the body tag instance, or is there some other mechanism that is broken by the body update?

          Show
          Ted Goddard added a comment - Please explain in additional detail how the body tag is being used – is there code that has a reference to the body tag instance, or is there some other mechanism that is broken by the body update?
          Hide
          yip.ng added a comment -

          No reference to body. There is a <div> appended near the end of body used by calendar manager. This <div> is wiped out indiscriminately by a body update.

          Show
          yip.ng added a comment - No reference to body. There is a <div> appended near the end of body used by calendar manager. This <div> is wiped out indiscriminately by a body update.
          Hide
          yip.ng added a comment -
          Show
          yip.ng added a comment - ICE-9455

            People

            • Assignee:
              yip.ng
              Reporter:
              yip.ng
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: