Stone, Sam ha scritto:
Using the API from Sep 2006 I was able to access externally an attribute
from a tiles definition as follows:

String sTilesDefName = (String) request.getAttribute("tile_name");
TilesContext tilesContext = new
ServletTilesContext(session.getServletContext(), request, response);

ComponentDefinition componentDefinition =
TilesUtil.getDefinition(sTilesDefName, tilesContext);

String sMyAtribute = (String)
componentDefinition.getAttribute("myAttribute");

I can't quite figure out how to do this using the current Tiles 2 API.

Well... you can't! At least, not the easy way that it was. If you want to manage definitions and attributes directly you have to create a container, probably extending the BasicTilesContainer class, or get the container and cast it to BasicTilesContainer class (dangerous), that accesses the definitions factory. Anyway what's your exact requirement? Why do you need to access the definition? Probably you don't need to access them, but only to "render" or "verify if the definition is there".

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




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

Reply via email to