【发布时间】:2012-10-01 09:51:28
【问题描述】:
我有一张地图,我想在 jsf 上进行迭代。地图如下 -
LinkedHashMap<Map<String,String>,Map<String,String>> propertyMap=new LinkedHashMap<Map<String,String>,Map<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 键入的 Map 听起来是个非常糟糕的主意...
-
但我的要求是我想在 jsf 页面上显示 4 个值,来自一个 spurce 本身
-
您能否详细说明您的要求?