[SalesForce] Passing multiple methods into Apex ‘rendered’ attribute

Can I pass a second method into the rendered attribute of the following apex element?

    <apex:outputText rendered="{!(firstMethod == true)}">           
        <img class="refresh_btn" src="{!URLFOR($Resource.Images, 'images/icon_refresh.png')}" alt=""/>
    </apex:outputText>

Would this work?

    <apex:outputText rendered="{!(firstMethod == true)} && {!(secondMethod == true)}">          
        <img class="refresh_btn" src="{!URLFOR($Resource.Images, 'images/icon_refresh.png')}" alt=""/>
    </apex:outputText>

So both firstMethod and secondMethod must return true for the element to render.

Best Answer

Yes you can, although your syntax is a little off. The following should work:

<apex:outputText rendered="{!(firstMethod == true) && (secondMethod == true)}"> 

Which you should be able to reduce to:

<apex:outputText rendered="{!firstMethod && secondMethod}">