I have a visualforce page that uses various components to try to print data from a list of custom objects. The idea is that it will display a list of types of relationships and then if clicked it will display the names of people who have that type of relationship.
In my controller I have a:
Map<String, List<Relationship_Detail__c>> typeToRelationships
where it takes the relationship type as the key and gives back all of the custom objects with that type.
<apex:repeat value="{!typeToRelationships}" var="relationshipType" rendered="{!IF(sortedByType==true, true, false)}">
<apex:commandLink action="{!relationshipTypeClicked}" rerender="relationsWithType">
<apex:outputText value="{!relationshipType} ({!typeToNumberOfRelationships[relationshipType]})"/>
<apex:param name="relationType" value="{!relationshipType}" assignTo="{!selectedType}"/>
<apex:param name="idOfViewer" value="{!contact.Id}" assignTo="{!selectedIDForType}"/>
</apex:commandLink>
<apex:outputPanel id="relationsWithType" >
<apex:dataList value="{!typeToRelationships[relationshipType]}" var="relation" rendered="{!IF(rendered[relationshipType]==true, true, false)}">
<apex:commandLink action="{!relationDetailClicked}">
various outputTexts
</apex:commandLink>
</apex:dataList>
</apex:outputPanel>
</apex:repeat>
I want to modify it so that the string is the relationship type + the id of the contact page
I am currently on.
The issue in doing that is with the dataList in the middle of the given code which renders based on a Map<String, Boolean>
called rendered
, which takes the same key and spits out true or false.
The code used rendered={!IF(rendered[relationshipType]
... for the dataList but now I want to do something like this:
rendered={!IF(rendered[relationshipType+contact.id]
.
Is this possible? Or is there a way to have the rendered attribute call a function with those parameters which would return true or false?