I want to implement logic which will change the scrollHeight of a datatable when a particular Primefaces panel is toggled open or closed.
So far I have found that I may be able to use javascript and PF(panelWidget)...
or use an ajax event handler to be able to know when the panel is toggled and react to it, but have not been able to work it out completely.
Here are the components I am working with:
<h:form id="form">
<p:panel id="toggleable" header="Toggleable" toggleable="true" widgetVar="panel">
<p:ajax event="toggle" update="list" />
</p:panel>
<p:datatable id="list" scrollable="true" scrollHeight="toggle?300:100">
</p:datatable>
</h:form>