我有一个bean,它返回键值对(String,String)的映射。在我jsff,我需要访问基于关键地图的值,它是一个动态的EL表达式地图中的动态El表达式评估
<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>
我不能安勤为地图的关键。 我试过了,
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
然而,这个工程
source="#{pageFlowScope.ImagesBean.imageUrlPair['Twitter']}
请帮我
什么是imageUrlPair的类型? – 2013-03-12 00:03:29
第一行是有效的语法。其他的是明显无效的语法。我不做ADF,但是这个问题表明与PrimeFaces'
'有相同的理由:http://stackoverflow.com/questions/8207325/display-image-from-database-with- pgraphicimage/12452144#12452144 – BalusC 2013-03-13 12:44:05