i have one map as following :
public lisT<integer> testIntList{get;set;}
public list<string> departmentsToShow{get;set;}
public map<string,List<Integer>> Dep_listToShow{get;set;}
which will show the integer list based on department name.
in visual force page when i write following :
<apex:repeat value="{!departmentsToShow}" var="department">
<apex:repeat value=" {!testIntList}" var="IntVal">
{!IntVal} --
</apex:repeat></apex:repeat>
its giving me following output : 1 — 2 — 3 — 4 — 5 — 6
tub when i write following :
<apex:repeat value="{!departmentsToShow}" var="department">
<apex:repeat value=" {!Dep_listToShow[department]}" var="IntVal">
{!IntVal}
</apex:repeat> </apex:repeat>
its giving me following output : [1, 2, 3, 4, 5, 6] but i need this output : 1 — 2 — 3 — 4 — 5 — 6
i want to loop the list of integer from map. how to do that?
thanks in advance.
Best Answer
Given that your controller is like this:
And your page is:
Output should be like: -1-2-3-4-5-6-