No its possible ... the following code works for me to get inner objects but
only values of the map , not both(keys and values )

##Map<String,ArrayList<HashMap<String, HashMap<String,String>>>>  
projectToProviders
##Map<projectid,ArrayList<HashMap<providerid, HashMap<attribute,value>>>>   

##Map<String,String> projectToProjectTitle 
##Map<projectid,projectTitle> 

#foreach( $providerList in $projectToProviders)
        #foreach( $providerMap in $providerList )
                #foreach( $providerDetails in $providerMap )
                                #foreach( $providerAttribute in 
$providerDetails )
                                                Attribute :: $providerAttribute
                                #end
                #end
        #end
#end

how can I get both keys and respective values in the map in velocity
template 


Mead Lai wrote:
> 
> Map<String,ArrayList<HashMap<String, HashMap<String,String>>>>
> you can't do this.
> Velocity can't get the inner object, which is inside another Collection.
> I just remeber someone told me that, but I am not skilled in it.
> 
> On Wed, Nov 5, 2008 at 10:00 PM, santhoshsd
> <[EMAIL PROTECTED]>wrote:
> 
>>
>> The following code is not working ??
>>
>>
>> ##Map<String,ArrayList<HashMap<String, HashMap<String,String>>>>
>> projectToProviders
>> ##Map<projectid,ArrayList<HashMap<providerid, HashMap<attribute,value>>>>
>>
>> ##Map<String,String> projectToProjectTitle
>> ##Map<projectid,projectTitle>
>>
>>
>> #foreach( $project in $projectToProviders.keySet() )
>>
>>        ##Project Title :: $projectToProjectTitle.get($project)
>>        #foreach( $providerList in $projectToProviders.get($project) )
>>
>>                                #foreach( $providerMap in $providerList )
>>                                        #foreach( $providerid in
>> $providerMap.keySet() )
>>                                                #foreach(
>> $providerAttributesMap in $providerMap.get($providerid) )
>>
>>                                                        #foreach(
>> $attribute
>> in $providerAttributesMap.keySet() )
>>                                                                $attribute
>> :: $providerAttributesMap.get($attribute)
>>                                                        #end
>>                                                #end
>>                                        #end
>>                                #end
>>        #end
>>
>> #end
>>
>> --
>> View this message in context:
>> http://www.nabble.com/iterating-over-Map%27s-keyset-values----tp20342223p20342223.html
>> Sent from the Velocity - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> BestRegards,
> Mead
> http://yayisoft.com
> 
> Bill Vaughan  - "The tax collector must love poor people, he's creating so
> many of them."
> 
> 

-- 
View this message in context: 
http://www.nabble.com/iterating-over-Map%27s-keyset-values----tp20342223p20343439.html
Sent from the Velocity - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to