I want to ajax update javascript script using with primefaces.
put it in a JSF tag, and give it Id.
<h:panelGroup id="myScript">
<script type="text/javascript">
function lineChartExtender(){
this.cfg.highlighter = {
showTooltip: true,
tooltipAxes: 'both',
tooltipLocation: 'n'
};
this.cfg.seriesDefaults = {
showMarker: #{query.stringMarker}
};
}
</script>
</h:panelGroup>
and have a button or link that does some action, or not, and updates this <h:panelGroup>
<h:commandLink action="#{myBean.doSomething}" update="myScript"/>