Can I do something like this:
<b:navLink ... onclick="ajax:callBeanMethodA;ajax:callBeanMethodB" />
Like that doesn't work, is there any way to make it work ?
Thanks
Can I do something like this:
<b:navLink ... onclick="ajax:callBeanMethodA;ajax:callBeanMethodB" />
Like that doesn't work, is there any way to make it work ?
Thanks
I guess your best bet it to combine these two or multiple method calls in a convenience method in your backing bean.
This way you can also make sure, that they're called in a consistent order:
Then just call the single convenience method from your listener:
Other advantages of this approach would be better readability and reusability and maintainability, as you defined the combined logic centrally.
Actually, it does work. It's just a bit simpler than you thought. Omit the second
ajax:
prefix, and things work fine:JSF markup:
Java bean: