>Thiago H. de Paula Figueiredo <thiagohp <at> > gmail.com> writes:
> > Em Mon, 24 Nov 2008 18:43:37 -0300, >Henrik Schlanbusch <henrik <at> enovate.no> > escreveu: > > > Is it possible in T5 to get hold >of page > > instances without using injected >properties, but through string > > identifiers like in T4? > > Using @InjectPage is the T5 way to >do it, but it is possible that there is > some way to do what you want. I'm just curious about what would be the > advantage of doing it using identifiers >(besides using something you're > already familiar with, of course. :)). > Hi Thiago I am doing this because I have one controller in the application that holds a mapping between object types and page ids. When I create an object of any type, the system will ask the controller to get a page that renders this object correctly. If I do this through annotations I have to have a page full of all pages as annotated properties, and then add these properties to a map where I map object type and page, which is a bit heavy I think. Now I have a spring injected map that simply maps com.somepackage. SomeObject->SomeObjectEditor. So when an instance of SomeObject has been created, I ask the map for the correct editor (which returns the logical name of the page), and set the object as a model on that page before returning it from my action method. Does that make sense to you? Maybe the pattern isn't good? I do not know, but it works. :-) Henrik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]