我有一个map,我想在jsf上迭代它。地图是这样的-
LinkedHashMap<Map<String,String>,Map<String,String>> propertyMap=new LinkedHashMap<Map<String,String>,Map<String,String>>();在前面,我以如下方式对类型为String,String的jsf迭代了下面的映射
List documentProperties = new ArrayList(propertyMap.entrySet());在jsf中:-
<af:iterator value="#{EditProperties.documentProperties}" var="list" id="i1">
<trh:rowLayout id="rl1">
<trh:cellFormat id= "cf3"><af:outputText value="#{list.key}"
id="ot1"/> </trh:cellFormat>
<trh:cellFormat id= "cf4">
<af:inputText id="it1"
value="#{list.value}" showRequired="false">
</af:inputText>
</trh:cellFormat>
</trh:rowLayout>但是如何在jsf上迭代内部有两个map的map呢?谢谢
发布于 2012-10-01 17:57:16
将Map作为key不是一个好主意。您应该使用Immutable对象作为哈希图的键。如果你想在Map中声明Map,你可以像下面这样做。
LinkedHashMap<String,Map<String,Map<String,String>>> propertyMap=new LinkedHashMap<String,Map<String,Map<String,String>>>();https://stackoverflow.com/questions/12670984
复制相似问题