This is also the general case for why you can return a page name from a event handler method, as well as a page instance or page class.
On Wed, Nov 26, 2008 at 6:35 PM, Thiago H. de Paula Figueiredo <[EMAIL PROTECTED]> wrote: > Em Tue, 25 Nov 2008 01:45:38 -0300, Henrik Schlanbusch <[EMAIL PROTECTED]> > escreveu: > >> Hi Thiago > > Hi, Henrik! > > The pattern you're using makes a lot of sense. :) I just wasn't smart enough > to find a problem that fitted your solution (getting a page through its > name). . . :D > >> 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] >> > > > > -- > Thiago H. de Paula Figueiredo > Independent Java consultant, developer, and instructor > Consultor, desenvolvedor e instrutor em Java > http://www.arsmachina.com.br/thiago > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]