myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] Resolved: (TOMAHAWK-1429) t:checkbox not checked correctly after validation error
Date Mon, 15 Jun 2009 20:44:07 GMT

     [ https://issues.apache.org/jira/browse/TOMAHAWK-1429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Leonardo Uribe resolved TOMAHAWK-1429.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.9-SNAPSHOT
         Assignee: Leonardo Uribe

I tested it and did some small modifications(the var checked is not necessary). Please the
next time if is possible try to send it in diff format to make it easier to understand and
commit.

        Set lookupSet = RendererUtils.getSubmittedValuesAsSet(facesContext, uiComponent, converter,
uiSelectMany);
        
        boolean useSubmittedValues = (lookupSet != null);
        if (!useSubmittedValues)
        {
            lookupSet = RendererUtils.getSelectedValuesAsSet(facesContext, uiComponent, converter,
uiSelectMany);
        }

Thanks to Mathias Werlitz for provide this patch.


> 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
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.9-SNAPSHOT
>
>
> 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.


Mime
View raw message