function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
neao18neao18 

Access Map<String,Map<String,Integer> in Visualforce without repeat tag

I am trying to access a Map<String,Map<String,Integer> in VF but I dont want to use repeat tag, as I know we can access a Map<String,String> as {!MapVal['Key']} in a page without any error.

but for the Map<String,Map<String,Integer> when I do this {!MapVal['Key']} it through a error as value not found in map. But at lest I should get the inside Map!!

Any Help!!
Best Answer chosen by neao18
neao18neao18
Hi I got my answere it was a old methord to access dubble dimention array like:
Map<String,Map<String,Integer> mapStr ;
{!mapStr['a']['b']} - where 'a' and 'b' are the key values

All Answers

Damien Phillippi033905702927186443Damien Phillippi033905702927186443
I'm not really sure why you want to do that part in your VF page.  This is the sort of logic that makes sense to be put into your controller.
neao18neao18
Hi I got my answere it was a old methord to access dubble dimention array like:
Map<String,Map<String,Integer> mapStr ;
{!mapStr['a']['b']} - where 'a' and 'b' are the key values
This was selected as the best answer
Avidev9Avidev9
Well this the ugly error that VF engine throws when doesn't find a Key that is in the map. In your case the VF engine is looking for a Key named 'Key' in the map, I think that key doesn't exists in the map. what about using a value that exists in map ?

It works perfectly and I have used it several times in my pages.