Reputation: 247
i have a map which i want to iterate over the jsf. The map is as -
LinkedHashMap<Map<String,String>,Map<String,String>> propertyMap=new LinkedHashMap<Map<String,String>,Map<String,String>>();
earlier i have iterated the following map on jsf of type String, String in following manner
List documentProperties = new ArrayList(propertyMap.entrySet());
And in 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>
But how can i iterate a map having two map inside it on jsf..?? Thanks
Upvotes: 0
Views: 978
Reputation: 19185
Map
as a key
is bad idea. You should use Immutable
objects as key to hashmap.
If you want to declare Map inside Map then you can do something like below.
LinkedHashMap<String,Map<String,Map<String,String>>> propertyMap=new LinkedHashMap<String,Map<String,Map<String,String>>>();
Upvotes: 1