Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: EE-3.3.0.GA_P07
-
Fix Version/s: EE-3.3.0.GA_P08
-
Component/s: ICECORE-Components
-
Labels:None
-
Environment:JSF 2.3
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration
-
Workaround Exists:Yes
-
Workaround Description:Use ace:ajax or f:ajax tags instead.
Description
When using JSF 2.3 and icecore:singleSubmit on a page, the first request triggered by icecore:singleSubmit causes the whole form to be updated, because the 'enctype' attribute in the 'form' element gets unrendered.
This is clearly visible on many showcase demos that use icecore:singleSubmit and ace:simpleSelectOneMenu, such as the 'Indicator Text' and 'Required Styling' demos of ace:comboBox and other components. When, you open a ace:simpleSelectOneMenu for the first time, it will close immediately. This is because all the elements in the form were replaced. This can be reproduced on any browser. Subsequent requests triggered by icecore:singleSubmit don't present any issues.
If instead of icecore:singleSubmit one uses ace:ajax or f:ajax tags, this issue doesn't happen.
The fact that the whole form is replaced can be seen with standard h:* components as well, with the following markup, for example:
<h:form id="form">
<icecore:singleSubmit submitOnBlur="true"/>
<h:inputText />
</h:form>
Just focus on the text field and then blur right away, without typing anything. Then, examine the response of the request and you'll see that the whole form was updated. No visual issues are present in this case, but this situation could potentially cause visual issues with other components or combinations of them.
This is clearly visible on many showcase demos that use icecore:singleSubmit and ace:simpleSelectOneMenu, such as the 'Indicator Text' and 'Required Styling' demos of ace:comboBox and other components. When, you open a ace:simpleSelectOneMenu for the first time, it will close immediately. This is because all the elements in the form were replaced. This can be reproduced on any browser. Subsequent requests triggered by icecore:singleSubmit don't present any issues.
If instead of icecore:singleSubmit one uses ace:ajax or f:ajax tags, this issue doesn't happen.
The fact that the whole form is replaced can be seen with standard h:* components as well, with the following markup, for example:
<h:form id="form">
<icecore:singleSubmit submitOnBlur="true"/>
<h:inputText />
</h:form>
Just focus on the text field and then blur right away, without typing anything. Then, examine the response of the request and you'll see that the whole form was updated. No visual issues are present in this case, but this situation could potentially cause visual issues with other components or combinations of them.
We should document this as a Known Issue and note in the JavaDoc and wiki docs that icecore:singleSubmit is deprecated for use with JSF 2.3, and that ace:ajax/f:ajax should be used instead.