Carsten Ziegeler wrote:
Ah, I see, no, it's simpler: if user is a map and "id" is a key in this map, you can simply useobject that contains a Map would that also be accessed by ${cocoon.session.attributes.user.attributes.id} ?
${cocoon.session.attributes.user.id} this is automatically resolved for you.
The problem is, I didn't say "user is a map", I said "user is an object that contains a Map". If it inexplicably had a getId() method and the map contained an id key there would obviously be a problem.
The easiest way is to add a getAttributes() method to the session and the request object; these methods return a map and then everything works. The implementation is easy as the attributes are stored in a map anyway.
How many objects does this syntax drill down? Is it like JXPath in that regard?
Ralph
