[SalesForce] Multiple conditions on rendered attribute

I need to display text based on record type & has teammember.But it displays both messages regardless of record type.Below is the part of my visualforce page.

<apex:outputLabel style="color:red;" 
                  rendered="{!IF(HasTeamMember && ENT_ED_LIHTC__c.recordtype.name =='Standard Deal', false, true)}" >
    Note: At least one Team Member with Role as Originator is required.<br/><br/>
</apex:outputLabel>

<apex:outputLabel style="color:red;" 
                  rendered="{!IF(HasTeamMember && ENT_ED_LIHTC__c.recordtype.name!='Standard Deal', false, true)}" >
    Note: At least one Team Member is required.<br/><br/>
</apex:outputLabel>

public boolean HasTeamMember
{
    get
    {
      ENT_ED_LIHTC__c deal = (ENT_ED_LIHTC__c)ctrl.getRecord();
      List<ENT_Enterprise_Team__c> tmForInsert = new List<ENT_Enterprise_Team__c>();
      list<RecordType> rtype =[Select id,recordtype.name From recordtype where id =:deal.recordtypeid];

        if(TeamMembers.size() > 0)
        {
            for(ENT_Enterprise_Team__c tm : TeamMembers)
            {
                if(tm.User__c != null && tm.Role__c != null && tm.Role__c != ''&& tm.Role__c == 'Originator' && rtype[0].name=='Standard Deal')
                {
                    return true;
                }

                if(tm.User__c != null && tm.Role__c != null && tm.Role__c != '' && rtype[0].name!='Standard Deal')
                {
                    return true;
                }
            }

            return false;
        }
        else
            return false;
    }
}

Best Answer

I've been able to make things like this by simply doing this:

render="{!HasTeamMeber && ENT_ED_LIHTC__c.recordtype.name =='Standard Deal'}"

At least it seems to work fine with a page I was working on.

Another way would be to have a Boolean method in your controller that returns true or false and put the logic there.