You need to sign in to do that
Don't have an account?
Divya Chandrasekaran
Used output panel and not Working!
I have custom object called Login__c. I have a picklist field called User_type which has values as
Admin
Employee
I have two visualforce page one for Login authentication and other for Employee details.Once the login is success it will redirect to Employee Details page.
Based upon the User_type(Admin or Employee) it should show and hide a panel in the Employee detail page.
how to achieve this ?
Admin
Employee
I have two visualforce page one for Login authentication and other for Employee details.Once the login is success it will redirect to Employee Details page.
Based upon the User_type(Admin or Employee) it should show and hide a panel in the Employee detail page.
how to achieve this ?
Like this:
Hope that helps,
Clint
U can use something as below:
In your controller create a variable which would have the value of the condition you need to check:
For example:
boolean isAdmin{get;set;}
boolean isEmployee {get;set;}
In your constructor or any method you can assign these variables true or false after checking the condition.
for example:
if(Login__c.User_type== 'Admin'){ // for example only
isAdmin = true;
}
then on your page u can use these variables to show hide any block:
<apex:outputPanel rendered="{!isAdmin}">
</apex:outputPanel>
<apex:outputPanel rendered="{!isEmployee }">
</apex:outputPanel>
This is a very basic and not optimized way. Please provide your code snippet in case you want a very specific solution.
Hope It helps.
Vibhor