Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3951

Action not performed on first click

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.7
    • 2.0.24, 2.1.18, 2.2.8
    • None
    • None

    Description

      h:commandButton action is not performed when there is one composite component with comments on interface section. This only happens in the first click after the server starts. The second time the user clicks, the action is performed as expected. If we remove the comment from the composite component, everything works.

      Test Case:

      Page

      <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:vc="http://xmlns.jcp.org/jsf/composite/core">

      <h:head>
      <title>JSF 2.2 Composite Component Test Case</title>
      </h:head>
      <h:body>
      <h:form>
      <vc:emptyComponent />
      <h:commandButton value="Execute Action" action="#

      {testBeanCC.printAction}

      " />
      </h:form>
      </h:body>
      </html>

      Managed Bean

      @ManagedBean(name="testBeanCC")
      @SessionScoped
      public class TestBeanCC {
      public String printAction()

      { System.out.println("action performed"); return null; }

      }

      Composite Component

      <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:composite="http://xmlns.jcp.org/jsf/composite">

      <composite:interface>
      <composite:attribute name="name"/> <!-- remove this comment to make it work -->
      </composite:interface>

      <composite:implementation>

      </composite:implementation>
      </html>

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            PTFilAntunes Filipe Antunes
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: