Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-23291

[GSS](7.4.z) Some Form attributes are lost by JSF rendering when enabling javax.faces.FACELETS_REFRESH_PERIOD

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.4.5.CR1, 7.4.5.GA
    • 7.4.3.GA
    • JSF
    • None
    • False
    • False
    • +
    • Hide

      1. Deploy the attached reproducer(test-jsf.zip).
      2. Click the "Click Here" button. And check the source of the page. You will see:

      <form id="it" name="it" method="post" action="/test-jsf/test.xhtml" enctype="application/x-www-form-urlencoded" style="font-size:8px;">

      This is the expected HTML source.
      3. After that, click the "Click Here" button twice. And check the source of the page. You will see:

      <form id="it" name="it" method="post" action="/test-jsf/test.xhtml">

      This is the unexpected HTML source. Because the enctype and the style are lost.

      Show
      1. Deploy the attached reproducer(test-jsf.zip). 2. Click the "Click Here" button. And check the source of the page. You will see: <form id= "it" name= "it" method= "post" action= "/test-jsf/test.xhtml" enctype= "application/x-www-form-urlencoded" style= "font-size:8px;" > This is the expected HTML source. 3. After that, click the "Click Here" button twice. And check the source of the page. You will see: <form id= "it" name= "it" method= "post" action= "/test-jsf/test.xhtml" > This is the unexpected HTML source. Because the enctype and the style are lost.

    Description

      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 a "style" attribute and the "h: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"
                                     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.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-rmartinc Ricardo Martin Camarero
              rhn-support-jyokosaw Jun Yokosawa
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: