Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<b:commandButton> action doesn't fire managed bean function #206

Closed
rpinquie opened this issue Dec 1, 2015 · 4 comments
Closed

<b:commandButton> action doesn't fire managed bean function #206

rpinquie opened this issue Dec 1, 2015 · 4 comments

Comments

@rpinquie
Copy link

rpinquie commented Dec 1, 2015

I've got a command button defined as follows:

b:commandButton size="xs" ajax="true" look="primary" value="Update settings" update="panel" action="#{managerManagedBean.updateSettings}" icon="ui-icon-check"

When clicked, the button does not fire the server side "updateSettings" function of my managed bean "ManagerManagedBean". I am under 0.7.0 version - any idea why it doesn't work as it does with primefaces?

Cheers.

@stephanrauh
Copy link
Collaborator

At first glance, your code looks good. However, we've taken a new approach to AJAX with BootsFaces 0.8.0, which will be released soon. See http://bootsfaces.net/Staging/forms/ajax.jsf.

@rpinquie
Copy link
Author

rpinquie commented Dec 1, 2015

Yeah, it seems the problem arises when AJAX attributes "ajax" and/or "update" are used.

  1. If there are two AJAX command buttons - e.g. one to change a panel content and another one to call a managed bean function on the new panel content, the second one doesn't trigger the action. Thus, as a work around, I am obligated to avoid using AJAX on the first button.

  2. When I do not use AJAX on both buttons, the sever side function is fired normally, but I get many printouts "Event is null - probably that's a bug in AJAXRenderer, roughly line 100" in the console...

@stephanrauh
Copy link
Collaborator

Omitting ajax="true" or update="something" converts the AJAX request into an ordinary request. Truth to tell, until 0.7 BootsFaces offered only limited AJAX support. So please apology my reluctance to support this version. Please fetch the preview version of 0.8.0 (see #151 on how to get it), and read the new guide on AJAX (see http://bootsfaces.net/Staging/forms/ajax.jsf). We've already started to release this version, so using the developer preview version is almost no risk (unless you want to release your product tomorrow). Currently, we're doing the final tests.

@stephanrauh
Copy link
Collaborator

I didn't hear from you, so I consider this issue fixed (in the upcoming version 0.8.0 of BootsFaces). Please reopen the issue if the problem persists with the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants