I have a button inside an xpages div and I am trying to compute the style class of that button based on a scoped variable.
Initially, the scoped variable's value is 'blue' and the background color of the button inside the div is blue as well.
When I click on a second button, I set the value of the scoped variable to 'green' and do a partial refresh of the div.
Now, I would expect the button to turn green, but the class is not being changed.
Here is the SSJS for computing the style class:
if(sessionScope.sTest == 'green'){
return 'btn-success';
}
else{
return 'btn-primary';
}
So, my question is, is a style class recalculated during a partial refresh or would I have to resort to either JQuery or Dojo in order to change the style class.
Any help would be highly appreciated!