I have an application that runs a timer script that does a click on an action button when it times out. The action button is hidden by display:none. on the action button I do a partial refresh on panelButtonBar from the onClick event. This all works great except part of what the onClick event does is sets a viewScope variable based on the condition of the document. The viewScope variable is vsIsLocked and can be either true or false. If the value is true I don't want the panelButtonBar refreshed. I created a field that does nothing called dummyField and added the following to the definition of the partial refresh:
(viewScope.get("vsIsLocked")) ? "dummyField" : "panelButtonBar"
by putting dBar.info statements in the code that is by the onClick of the action Button I know that it is running on schedule, I also know that the value of vsIsLocked has changed from true to false, but the panelButtonBar does not refresh. As I said if I take the conditional statement out and just do a partial refresh of panelButtonBar the refresh works, the conditional partial refresh does not. I believe my js correct. I tried:
(viewScope.get("vsIsLocked")) ? "" : "panelButtonBar"
but then the partial refresh seems to run as a total refresh.
renderedattribute. If the button you're hiding via CSS is inside your partial refresh target, and you compute therenderedattribute of its event handler, when you programmatically "click" the button, nothing will happen ifrenderedevaluates to false, because the click event will not have been registered. - Tim Tripcony