Filipe Antunes created MYFACES-3951:
---------------------------------------
Summary: Action not performed on first click
Key: MYFACES-3951
URL: https://issues.apache.org/jira/browse/MYFACES-3951
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 2.2.7
Reporter: Filipe Antunes
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>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)