Search code examples
javajavascriptjsf-2richfacesel

Calling javascript method based on controller returned value


I have two Javascript method out of which I want to call only one depending upon the value returned by Controller. Actually I wanted to hide rich:popPannel if listSize > 0 and if listSize = 0 rich:popPannel should be there on focus which JSF component shall I use which might help me in implementing this type of criteria?


Solution

  • Are you using listSize anywhere else in your code ? If not you can return a boolean depending upon the value of listSize, which you would be using to show or hide popupPanel.