t:checkbox not checked correctly after validation error
-------------------------------------------------------

                 Key: TOMAHAWK-1429
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1429
             Project: MyFaces Tomahawk
          Issue Type: Bug
    Affects Versions: 1.1.8
         Environment: Sun RI, JSF 1.2
            Reporter: Mathias Werlitz


If you use t:selectManyCheckbox with layout="spread" and t:checkbox the 
selection of the checkboxes after an validation error is incorrect. When using 
layout="pageDirection" it is correct.

When using layout="spread" and t:checkbox HtmlCheckboxRenderer renders the last 
successfully validated component values (intenally stored 
HtmlSelectManyCheckbox.value) checked after an validation error. This is not 
correct. It should render the checkboxes as submitted like HtmlCheckboxRenderer 
does when t:selectManyCheckbox is used with layout="pageDirection".

The method renderSingleCheckbox() of 
org.apache.myfaces.renderkit.html.ext.HtmlCheckboxRenderer should lookup the 
valueSet like in renderCheckboxListVertically() and determine the checked 
boolean more like renderGroupOrItemCheckbox().

Example:

<t:selectManyCheckbox id="test" required="true" value="#{value}"  
layout="spread" >
        <t:selectItems ...../>
</t:selectManyCheckbox>

<t:checkbox for="test" index="0" />
<t:checkbox for="test" index="1" />
<t:checkbox for="test" index="2" />

<h:inputText required="true" />

1. you select checkbox one and submit the form -> validation error for inputText
2. you deselect checkbox one and submit the form -> validation error for 
selectManyCheckbox  and inputText BUT
    checkbox one is checked although it was submited not checked


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to