You need to sign in to do that
Don't have an account?

How to make a field display only from an apex class?
While opening a visual force page i would like to see some fields displayonly dynamically. How to achieve this functionality through an apex class? is there any particular syntax like 'field.display = false' ? Please suggest.
I don't understand the requirement then - what's the logic that determines if a field appears?
The display of some fields on the page are dependent on the roles(not profiles). So depending on the role of the user who logged in, fields should be displayed for him. So i have to do it from the class itself. To summarise, the code would look like this:
If role = x, field.display = true;
In this way, is there anything to control the field visibility?