Details
-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 4.0.BETA
-
Fix Version/s: None
-
Component/s: ACE-Components
-
Labels:None
-
Environment:Windows, Jboss AS 5.1 (I know it doesn't support JSF 2.0 by default, but I make it work).
-
Workaround Exists:Yes
-
Workaround Description:
Description
I have a form containing ace:checkboxButton:
<ace:checkboxButton id="myFlag" binding="#{backBean.binding}" value="#{action.myFlag}"/>
and a Clear button:
<h:commandButton id="clearButton" action="#{backBean.clear}" value="Clear"/>
in clear() function I set myFlag to false and reset the binding submitted value:
myFlag = false;
binding.setValue(null);
binding.setSubmittedValue(null);
binding.setLocalValueSet(false);
binding.setValid(true);
In the browser I check the checkbox and press the Clear button. I'm expecting, that the checkbox will be unchecked, but it's not.
ice:selectBooleanCheckbox is unchecked as expected.
I think the issue is in the DOMPartialViewContext.applyBrowserChanges() method, it updates all inputs with id's, but ace:checkboxButton has hidden input with no id.
DOMPartialViewContext compares the old DOM and the new DOM, and in both of them the checkbox is unchecked, so DOMPartialViewContext doesn't genereate update for it.
<ace:checkboxButton id="myFlag" binding="#{backBean.binding}" value="#{action.myFlag}"/>
and a Clear button:
<h:commandButton id="clearButton" action="#{backBean.clear}" value="Clear"/>
in clear() function I set myFlag to false and reset the binding submitted value:
myFlag = false;
binding.setValue(null);
binding.setSubmittedValue(null);
binding.setLocalValueSet(false);
binding.setValid(true);
In the browser I check the checkbox and press the Clear button. I'm expecting, that the checkbox will be unchecked, but it's not.
ice:selectBooleanCheckbox is unchecked as expected.
I think the issue is in the DOMPartialViewContext.applyBrowserChanges() method, it updates all inputs with id's, but ace:checkboxButton has hidden input with no id.
DOMPartialViewContext compares the old DOM and the new DOM, and in both of them the checkbox is unchecked, so DOMPartialViewContext doesn't genereate update for it.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion