Visualforce page:
<apex:commandButton value="Submit" action="{!Submit}" rendered="{!CanSubmit}" />
Currently I have this following code in my Apex:
public boolean CanSubmit
{
get
{
if(employee.Status__c == EmployeeStatus.get('Submit').getValue())
{
return true;
}
else
{
return false;
}
}
}
Now, I need to add few more condition to the Submit button whether to show the button but I'm not sure how to achieve this since I already have rendered={!CanSubmit}
, how should I add extra condition to rendered
?
rendered="{!IF($Profile.Name =='System Administrator'||$Profile.Name =='Sales Manager', true , false)}"