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 display:hidden
).
Take the 2-minute tour
×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.
|
|||
|
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: Apex Class:
Visualforce page: after user clicks on the "Check" button a method "myMethod" called. If it fails the variable gets a "hidden" class.
|
|||
|