Is it possible to add a CSS class to one of the Visualforce page objects from controller?
What I want to achieve is to handle one exception in controller. From
catch block I want to be able to hide a form (add a CSS class to form with
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Create a variable in your controller,
assign it true/false depending on condition(exception in your case)
surround form you want to show by an output panel
You can assign a class name to the variable and then dynamically assign a new value:
Visualforce page: after user clicks on the "Check" button a method "myMethod" called. If it fails the variable gets a "hidden" class.