I have a bean which returns me map of key-value pairs ( String,String) . In my jsff, I need to access the map's value based on key which is a a dynamic El expression
<af:iterator id="i1" value="#{bindings.leaderBoardEntities.collectionModel}"
var="entity" rows="#{bindings.leaderBoardEntities.rangeSize}">
<af:image id="i2" source="# {pageFlowScope.ImagesBean.imageUrlPair[entity.displayName]}"
shortDesc="user info" inlineStyle="width:50px;height:50px;"/>
</af:iterator>
I am unable to evalue the key for the map. I tried,
source="#{pageFlowScope.ImagesBean.imageUrlPair[entity.displayName]}
source="#{pageFlowScope.ImagesBean.imageUrlPair['#{entity.displayName}']}
source="#{pageFlowScope.ImagesBean.imageUrlPair['${entity.displayName}']}
source="#{pageFlowScope.ImagesBean.imageUrlPair[#{entity.displayName}]}--this is syntactically wrong
However , this works
source="#{pageFlowScope.ImagesBean.imageUrlPair['Twitter']}
Kindly help me