BootsFaces icon indicating copy to clipboard operation
BootsFaces copied to clipboard

How make a button that update 2 or more forms?

Open karlapdiaz opened this issue 9 years ago • 3 comments

How make a button that update 2 or more forms???? In PrimeFaces just put styleClass="mystyle" and to the commandButton update="@(.mystyle)" But how I do in Bootsfaces?

karlapdiaz avatar Nov 26 '15 04:11 karlapdiaz

From a technical point of view, I'm sure you can do the same with BootsFaces 0.8.0 and above. We support the update="@(.mystyle)" syntax, too.

However, you should be aware you're using a feature that's not supported by HTML. Even worse, you're using a feature that's forbidden by the HTML specification. HTML doesn't allow you to submit multiple forms with a single click. So you build your application on weak foundations. In the case of BootsFaces I'm sure this won't break anytime soon, but it's perfectly possible that the PrimeFaces team fixes the bug in a future version.

stephanrauh avatar Nov 26 '15 19:11 stephanrauh

Oh, and please report your error in the open-source-project (BootsFaces-OSP).

stephanrauh avatar Nov 27 '15 21:11 stephanrauh

This is how I'm doing it with plain old JSF:

                <h:commandButton id="reloadContentButton" value="reload">
                    <f:ajax execute="@form" render="applicationEmergencies hostEmergencies"
                            onevent="onContentReload" />
                </h:commandButton>

The onContentReload function can be left out. I'm using it to log a message to console.

hubertgrzeskowiak avatar Apr 04 '16 10:04 hubertgrzeskowiak