The simplest solution is to make your button a submit button, this way when
it clicked, the entire page will be reloaded components will render
according to their new state.
The second approach can be using ajax. I prefer the approach described on
this blog:
I suggest you work with a callback/listener mechanism.
ButtonPanel has a reference to a calback/listener. In the onclick() you call
that callback. The implementation of that callback can be done by the
component/page that uses the buttonPanel. (Losely coupling...)
On Tue, Dec 8, 2009 at 12:21