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
LinkYogiLinkYogi 

Rendering in apex:outputPanel

vf page:
apex:pageBlockTable value="{!Opportunity}" var="op" align="center" style="border:none;"
              
              apex:column 
              
                   apex:outputPanel rendered="{!IF(CONTAINS(mapKey,op.name)=True,False,True)}"  
                       apex:commandButton value="Add to LY Prospect List" action="{!show}" rerender="popup" onclick="this.style.visibility = 'hidden' "
                             apex:param name="OppName" value="{!op.id}" assignTo="{!opid}"/
                       /apex:commandButton
                   /apex:OutputPanel

Apex Page:

public string mapkey;

       for(Companies com: compList){
            if(MrktRatngMap.containsKey(com.ComName)==True){
            mapKey=mapKey+' '+com.ComName;

             }
     }

Q Please let me know the meaning of the statement: apex:outputPanel rendered="{!IF(CONTAINS(mapKey,op.name)=True,False,True)}"  
Best Answer chosen by LinkYogi
LinkYogiLinkYogi
@Mohit-The above response is not correct.  if condition is true then rendered= false & if condition is false, then rendered=true. Here {!IF..}, !- this sign refers to immertion that refers apex class variable. 

All Answers

Mohit Bansal6Mohit Bansal6
Hi

This means "Command button  section would be displayed or hidden depending upon the value returned by contains condtion.

If contains return true, then command button is not displayed, else it will display command button.

Regards
Mohit Bansal
LinkYogiLinkYogi
@Mohit-The above response is not correct.  if condition is true then rendered= false & if condition is false, then rendered=true. Here {!IF..}, !- this sign refers to immertion that refers apex class variable. 
This was selected as the best answer