Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1592

TemplateParser converts <div ...></div> structures into <div ... /> structures


    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.1.2
    • Component/s: Framework
    • Labels:
    • Environment:
      WinXP, IE 6 and Firefox, Tapestry 4.1.1


      The TemplateParser converts <div ...></div> structures to <div ... /> (EmptyTag) structures, which is a problem for div-Tags since browsers handles them different.

      For example: I need to build a javascript-scrollbar with divs and my template (Tapestry 4.0) looks like this:

      1 <div jwcid="@Any" class="sbar-horizontal" id="ognl:componentId + 'sbar-horizontal' + currentFooterIndex">
      2 <div jwcid="@Any" class="sbar-horizontal-left" id="ognl:componentId + 'sbar-horizontal-left' + currentFooterIndex" style="ognl:scrollbarHorizontalButtonStyle"></div>
      3 <div jwcid="@Any" class="sbar-horizontal-track" id="ognl:componentId + 'sbar-horizontal-track' + currentFooterIndex" style="ognl:scrollbarHorizontalTrackStyle">
      4 <div jwcid="@Any" class="sbar-horizontal-handle" id="ognl:componentId + 'sbar-horizontal-handle' + currentFooterIndex" style="ognl:scrollbarHorizontalHandleStyle"></div>
      5 </div>
      6 <div jwcid="@Any" class="sbar-horizontal-right" id="ognl:componentId + 'sbar-horizontal-right' + currentFooterIndex" style="ognl:scrollbarHorizontalButtonStyle"></div>
      7 </div>

      Note the closing divs in line2, 4 and 6

      Because Tapestry 4.1 now converts the code to this:

      1 <div class="sbar-horizontal" id="webgantt-sbar-horizontal-0">
      2 <div class="sbar-horizontal-left" id="webgantt-sbar-horizontal-left-0" style="someStyle"/>
      3 <div class="sbar-horizontal-track" id="webgantt-sbar-horizontal-track-0" style="someStyle">
      4 <div class="sbar-horizontal-handle" id="webgantt-sbar-horizontal-handle-0" style="someStyle"/>
      5 </div>
      6 <div class="sbar-horizontal-right" id="webgantt-sbar-horizontal-right-0" style="someStyle"/>
      7 </div>

      The divs in line 2, 4 and 6 are now converted into empty tags, which is a problem for this structure. Browsers (IE, FF) now puts the "track" into the "left" div instead besides the "left" div and the "right" div into the "track" div instead besides the "track" div, which is not correct / not wanted.




            • Assignee:
              jkuhnert Jesse Kuhnert
              cnutz Christian Nutz
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: