Below is my vf page code:

I want to render logics "renderlogic1" and "renderlogicforCustomParts" together to make the field displayed. Please suggest.

Below is the vf page code:

<apex:column style="vertical-align:top; width:280px;" headerValue="Donor Requirements" 
             rendered="{!renderlogic1}" >
    <apex:outputPanel rendered="{!renderlogicforCustomParts}"> <!-- Show this field for any custom + 70047.* and 70048.* -->
     <apex:outputText value="{!$ObjectType.OpportunityLineItem.Fields.ADCC_Status__c.Label}"  /><br />
     <apex:inputField value="{!olineWrap.oline.ADCC_Status__c}" />
                        <br /> 

Below is Apex code for logic renderlogic1 and renderlogicforCustomParts

for(Part_IDs__c Pid : CustParts.values()) {
if(Pid.Part_ID_1__c == searchString ||Pid.Part_ID_2__c == searchString){ 
renderlogicforCustomParts = true;}     } 

    RecordTypeName = 

          OpportunityRecordTypes__c  OppRecType;
          OppRecType =[SELECT PrimaryCellsOpportunity__c,CustomOrderOpportunity__c,Fresh_Blood_cells__c,ProductFamily__c FROM OpportunityRecordTypes__c];            
        if (RecordTypeName==OppRecType.PrimaryCellsOpportunity__c)
  • the question is not clear; please use edit and give examples of how you want the output to look like – cropredy Nov 17 '17 at 5:31
  • Hi Mate, All I am trying to check is if I can render <apex:outputPanel rendered="{!renderlogicforCustomParts} && {!renderlogic1} at sametime to display the field. – user31302 Nov 17 '17 at 6:00

Multiple conditions in a rendered="..." expression are done this way:

<apex:outputPanel rendered="{!renderlogicforCustomParts && renderlogic1}"/> or

<apex:outputPanel rendered="{!AND(renderlogicforCustomParts, renderlogic1)}"/> 

The formula expression starts with {!. Everything inside the {! ...} should not have a merge field expression {!..} as SFDC evaluates all expressions within the outer {!..} to their relevant fields/methods in the controller

| improve this answer | |

you can use visualforce "AND" operator in render condition.

<apex:column style="vertical-align:top; width:280px;" headerValue="Donor Requirements" 
         rendered="{! AND(renderlogic1, renderlogicforCustomParts) }" >

you can also use below link for further detail.



| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy