pageDirection layout for selectManyCheckbox not rendered correctly
------------------------------------------------------------------

         Key: MYFACES-1095
         URL: http://issues.apache.org/jira/browse/MYFACES-1095
     Project: MyFaces
        Type: Bug
  Components: Tomahawk  
    Versions: 1.1.1    
 Environment: Windows 2003 Server, Java 1.4.2, Tomcat 5.0.28, facelets 1.0.2, 
Firefox 1.5.1
    Reporter: David Crutchfield


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">&#160;1</label></td></label></td><td><label>            
<td><label><input type="checkbox" name="_tagId3:myEnhancedSelectManyCheckbox" 
value="3">&#160;3</label></td></label></td></tr><tr><td><label>           
<td><label><input type="checkbox" name="_tagId3:myEnhancedSelectManyCheckbox" 
value="2">&#160;2</label></td></label></td><td><label>            
<td><label><input type="checkbox" name="_tagId3:myEnhancedSelectManyCheckbox" 
value="4">&#160;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">&#160;1</label></td></tr></label></td><td><label>          
<tr><td><label><input type="checkbox" 
name="_tagId3:myEnhancedSelectManyCheckbox" 
value="2">&#160;2</label></td></tr></label></td></tr><tr><td><label>          
<tr><td><label><input type="checkbox" 
name="_tagId3:myEnhancedSelectManyCheckbox" 
value="3">&#160;3</label></td></tr></label></td><td><label>           
<tr><td><label><input type="checkbox" 
name="_tagId3:myEnhancedSelectManyCheckbox" 
value="4">&#160;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.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to