h:commandButton with image breaks
----------------------------------
Key: MYFACES-3180
URL: https://issues.apache.org/jira/browse/MYFACES-3180
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 2.0.8-SNAPSHOT
Environment: MyFaces API + Impl 2.0.8-Snapshots (current build from
trunk)
Reporter: Oliver Bayer
I've tried to create a simple reload button which triggers a bean method via
ajax. With a "normal" button it works perfectly but as soon as I add an image
to the button the method doesn't get called. See the following code snippets:
<h:commandButton id="buttonWithoutImage">
<f:ajax event="click" listener="#{ajaxTest.printHello}"
render="anotherComponent" />
</h:commandButton>
<h:commandButton id="buttonWithImage"
image="#{resource['images:icons/reload.png']}">
<f:ajax event="click" listener="#{ajaxTest.printHello}"
render="anotherComponent" />
</h:commandButton>
@ManagedBean
@SessionScoped
public class AjaxTest
{
public void printHello(AjaxBehaviorEvent ajaxEvent)
{
System.out.println("Hello World from Ajax-Listener");
}
}
The first button works on each click while the second with the image never
calls the bean method.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira