How can i check if a list has certain string in salesforce.
For example I have :
anotherList
which is from controller and has
this value [NAME_A, NAME_B, NAME_C]
Then in my page:
<apex:repeat var="list" value="{!tesList}">
<input type="checkbox" style="display:{!IF(CONTAINS(anotherList, list['name']), '','none')}" value="{!list['name']}" />
</apex:repeat>
But i got an error saying that Error: Incorrect parameter type for function 'CONTAINS()'. Expected Text, received Object
So parameters should only be Strings right? But how can i do something like this in Visualforce page?
<!-- JSTL sample -->
<c:forEach var="list" items="${testList}">
<c:if test="${fn:contains(anotherList, list.name)}">
<input type="checkbox" value="${list.name}" />
</c:if>
</c:forEach>