MyFaces Tomahawk
  1. MyFaces Tomahawk
  2. TOMAHAWK-20

pageDirection layout for selectManyCheckbox not rendered correctly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows 2003 Server, Java 1.4.2, Tomcat 5.0.28, facelets 1.0.2, Firefox 1.5.1

      Description

      The following is taken from the wiki example @ http://wiki.apache.org/myfaces/HtmlSelectManyCheckbox

      The example JSF UI code looks like:

      • NOTE: this example uses lineDirection layout

      <t:selectManyCheckbox id="myEnhancedSelectManyCheckbox" layout="lineDirection" layoutWidth="2">
      <f:selectItem itemLabel="1" itemValue="1"/>
      <f:selectItem itemLabel="2" itemValue="2"/>
      <f:selectItem itemLabel="3" itemValue="3"/>
      <f:selectItem itemLabel="4" itemValue="4"/>
      </t:selectManyCheckbox>

      The HTML generate from this code looks like:

      <table id="_tagId3:myEnhancedSelectManyCheckbox"><tr><td><label> <td><label><input type="checkbox" name="_tagId3:myEnhancedSelectManyCheckbox" value="1"> 1</label></td></label></td><td><label> <td><label><input type="checkbox" name="_tagId3:myEnhancedSelectManyCheckbox" value="3"> 3</label></td></label></td></tr><tr><td><label> <td><label><input type="checkbox" name="_tagId3:myEnhancedSelectManyCheckbox" value="2"> 2</label></td></label></td><td><label> <td><label><input type="checkbox" name="_tagId3:myEnhancedSelectManyCheckbox" value="4"> 4</label></td></label></td></tr></table>

      The physical layout rendered in the browser looks like:
      [1][3]
      [2][4]

      The following code is modified to use the pageDirection layout it looks like:

      <t:selectManyCheckbox id="myEnhancedSelectManyCheckbox" layout="pageDirection" layoutWidth="2">
      <f:selectItem itemLabel="1" itemValue="1"/>
      <f:selectItem itemLabel="2" itemValue="2"/>
      <f:selectItem itemLabel="3" itemValue="3"/>
      <f:selectItem itemLabel="4" itemValue="4"/>
      </t:selectManyCheckbox>

      The HTML generated from this code looks like:

      <table id="_tagId3:myEnhancedSelectManyCheckbox"><tr><td><label><tr><td><label> <input type="checkbox" name="_tagId3:myEnhancedSelectManyCheckbox" value="1"> 1</label></td></tr></label></td><td><label> <tr><td><label><input type="checkbox" name="_tagId3:myEnhancedSelectManyCheckbox" value="2"> 2</label></td></tr></label></td></tr><tr><td><label> <tr><td><label><input type="checkbox" name="_tagId3:myEnhancedSelectManyCheckbox" value="3"> 3</label></td></tr></label></td><td><label> <tr><td><label><input type="checkbox" name="_tagId3:myEnhancedSelectManyCheckbox" value="4"> 4</label></td></tr></label></td></tr></table>

      The physical layout rendered in the browser looks like:
      [1]
      [2]
      [3]
      [4]

      It should look like:
      [1][2]
      [3][4]

      The cause:
      If you notice the HTML generate is not well formed for the pageDirection layout, and it gets rendered incorrectly.

        Activity

          People

          • Assignee:
            Martin Marinschek
            Reporter:
            David Crutchfield
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development