I have a JavaScript function using a value from a backing bean, like var x = #{bean.value}.
On page load, the value for x is final until the page is being reloaded (since EL is being replaced by its actual value string).
However, the bean's value might change due to ajax requests.
How can I achieve that x gets updated?
Here's an excerpt from my xml (using primefaces' calendar component) to clarify:
<p:calendar beforeShowDay="highlightDays" ... />
<script>
function highlightDays(){
var highlightedDays= #{bean.specialDays()};
// set css...
}
</script>