Some attributes of HTML Form element are lost by JSF rendering when enabling javax.faces.FACELETS_REFRESH_PERIOD in JBoss EAP 7
Issue
For example, regarding to the below, enctype
and style
attributes of HTML Form element are lost.
Expected HTML source:
<form id="it" name="it" method="post" action="/test-jsf/test.xhtml" enctype="application/x-www-form-urlencoded" style="font-size:8px;">
Actual HTML source:
<form id="it" name="it" method="post" action="/test-jsf/test.xhtml">
The issue happens on the following conditions:
- The
javax.faces.FACELETS_REFRESH_PERIOD
parameter is used on web.xml
<context-param>
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
<param-value>1</param-value>
</context-param>
- The
h:form
tag has astyle
attribute and theh:commandButton
tag is used as page update.
<h:form id="it" style="font-size:8px;">
<div class="container">
<div class="form-group">
<h:commandButton id="test01" value="Click Here" <== HERE
actionListener="#{testBean.testFunc}" />
<h:panelGrid columns="4" cellpadding="5" class="ui-grid"
style="width:1200px;">
<h:outputText value="TEST STRINGS." /><br/>
</h:panelGrid>
</div>
</div>
</h:form>
The form attribute(style
, enctype
and etc..) are lost when the h:commandButton
tag is executed over three times.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 7.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.