Forgot to mention that the PageRenderLinkSource is not part of T5.0.18, It was introduced later.
- Ville Ville Virtanen wrote: > > Hi, > > Two solutions: > > 1. Use PageLink in tml. (And supply the context to it from the java class) > > 2. Use PageRenderLinkSource (return > PageRenderLinkSource.createPageRenderLinkWithContext(WriteMsg.class, > Object... context);) > > Neither requires injected page. > > - Ville > > > Angelo Chen wrote: >> >> Hi, >> >> I have a page called WriteMsg, in another page I use follow code to >> inject the page >> >> @InjectPage >> private WriteMsg writeMsg >> >> Ojbect onActionFromWrite() { >> return writeMsg; >> } >> >> but how to pass a context to the instance of page without using @Persist >> instances? >> >> Thanks, >> >> >> >> public class WriteMsg { >> >> Object onActivate(EventContext ec) { >> } >> >> } >> > > -- View this message in context: http://www.nabble.com/t5%3A-InjectPage-and-context-tp23355029p23356065.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org