[
https://issues.apache.org/jira/browse/MYFACES-3180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Leonardo Uribe resolved MYFACES-3180.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.1.2
2.0.8
Assignee: Leonardo Uribe
Thanks to Oliver Bayer for provide the test case to reproduce this issue.
> h:commandButton with image breaks ajax
> --------------------------------------
>
> 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
> Assignee: Leonardo Uribe
> Fix For: 2.0.8, 2.1.2
>
>
> 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