function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Brijesh KumarBrijesh Kumar 

How can hide link for particuilar user rather than non-clickable link

Hi
I use <apex:outputlink> for e.g.
<apex:outputLink value="https://www.salesforce.com" id="theLink">www.salesforce.com</apex:outputLink>
It has one attribute disabled,when it is true link is not clickable and when it is false link is normally.
I done how to non-clickable link for user based.But my requirement is how can hide link for particular user.
 
for non-clickable ,i differntciate user inside controller
private Boolean linkDisabled = false;
    private String userId = UserInfo.getProfileId();
    public PageReference hello() {
   
    if(userId!='00e70000000wnPPAAY')
    {
    linkDisabled = true;
    }
        return null;
    }
    public Boolean getLinkDisabled () {
        return linkDisabled ;
    }
 
so please give me a solution how can hide a link rather than non-clickable.
 
Thanks & Regards
Brijesh Kumar Baser
Ron HessRon Hess
i think you want the attribute called "rendered" , if this is false your link will not draw
Brijesh KumarBrijesh Kumar
 
Thanks your reply.I have successfully add to my project & i got a solution.
Thanks again
 
Thanks & Regards
Brijesh Kumar Baser