function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SimbaSimba 

Hide and Show buttons on Visualforce page, based on data..

I have a button on the Visualforce page, and need to show that button only if there are rows in the table (pageBlockTable section). The VF page uses custom controller.

Also, is there any way to hide and show the buttons based on certain conditions. I tried embedding javascript around it, but did not work.

Thanks


chachichachi
You can use the 'rendered' attribute and bind it to something in your controller like: {!ShouldThisBeRendered} :)

Check your 'data' and then set the prop in the APEX class.