Re: InterruptDispatchException and ObjectRepository
Christian Cryder <[email protected]> Thu, 02 Jun 2005 08:58:07 -0600
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------080802060302040105030704 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Just to build on what Stefan said, the only time a local repository is persisted beyond the scope of a single req-resp cycle is in the case of a ClientSideRedirectException (you can see where this happens by searching the source for persistContext and restoreContext). As for moving the repopulation stuff up into main, I'm not opposed to it, but I haven't looked at it very closely either. We are doing form repopulation ourselves just using what is currently in the main forms package, but I don't remember enough details offhand to tell you exactly how we are doing it. I could check into that if you are interested... Christian Stefan Armbruster wrote: >Hi, > >quoting from ObjectRepository's javadoc: >"The Local object repository is a statemap object that lasts for the duration >of a req-resp cycle." >Since the InterruptDispatchException only intercepts event handling inside a >single req-resp-cycle, the local repository should survice. > >Regarding the RepopFormMap questions: The EventContext itself is a StateMap >(just like a local repository), so I'd recommend using context.putState() for >storing a RepopulationFormMap in the control handler. When entering the >"View" handler, using context.getState() gets back the FormMap serving as a >model. After rendering, the formmap is being discarded. > >The re-request builds up a new FormMap and the cycle starts over again. > >Regards, >Stefan > >Am Donnerstag, 2. Juni 2005 10:29 schrieb [email protected]: > > >>Hi, >> >>I have a question regarding ObjectRepository, and especially >>LocalRepository. >> >>Does its content survive to a InterruptDispatchException ? >> >>Another question (regarding Diez' contrib package) : what would be the >>best place to save a RepopulationFormMap between request / response / >>re-request events and to ensure form is really repopulated ? >> >>By the way, why didn't we include Repopulation stuff into main ? >> >> >>Franck >> >> > > > >------------------------------------------------------------------------ > > >-- >Barracuda mailing list >[email protected] >http://www.objectweb.org/wws/lists/projects/barracuda > > -- Christian ------------------------------------------------------------------------ Christian Cryder Internet Architect, ATMReports.com <http://atmreports.com> ------------------------------------------------------------------------ /"Coffee? I could quit anytime, just not today" http://seelifedifferently.blogspot.com/ --------------080802060302040105030704 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Just to build on what Stefan said, the only time a local repository is persisted beyond the scope of a single req-resp cycle is in the case of a ClientSideRedirectException (you can see where this happens by searching the source for persistContext and restoreContext).<br> <br> As for moving the repopulation stuff up into main, I'm not opposed to it, but I haven't looked at it very closely either. We are doing form repopulation ourselves just using what is currently in the main forms package, but I don't remember enough details offhand to tell you exactly how we are doing it. I could check into that if you are interested...<br> <br> Christian<br> <br> <br> <br> Stefan Armbruster wrote: <blockquote cite="[email protected]" type="cite"> <pre wrap="">Hi, quoting from ObjectRepository's javadoc: "The Local object repository is a statemap object that lasts for the duration of a req-resp cycle." Since the InterruptDispatchException only intercepts event handling inside a single req-resp-cycle, the local repository should survice. Regarding the RepopFormMap questions: The EventContext itself is a StateMap (just like a local repository), so I'd recommend using context.putState() for storing a RepopulationFormMap in the control handler. When entering the "View" handler, using context.getState() gets back the FormMap serving as a model. After rendering, the formmap is being discarded. The re-request builds up a new FormMap and the cycle starts over again. Regards, Stefan Am Donnerstag, 2. Juni 2005 10:29 schrieb <a class="moz-txt-link-abbreviated" href="mailto:[email protected]:">[email protected]:</a> </pre> <blockquote type="cite"> <pre wrap="">Hi, I have a question regarding ObjectRepository, and especially LocalRepository. Does its content survive to a InterruptDispatchException ? Another question (regarding Diez' contrib package) : what would be the best place to save a RepopulationFormMap between request / response / re-request events and to ensure form is really repopulated ? By the way, why didn't we include Repopulation stuff into main ? Franck </pre> </blockquote> <pre wrap=""><!----> </pre> <pre wrap=""> <hr size="4" width="90%"> -- Barracuda mailing list <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> <a class="moz-txt-link-freetext" href="http://www.objectweb.org/wws/lists/projects/barracuda">http://www.objectweb.org/wws/lists/projects/barracuda</a> </pre> </blockquote> <br> <br> <div class="moz-signature">-- <br> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; "> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Foo bar rama</title> <p>Christian</p> <table border="0"> <tbody> <tr> <td width="100%"> <hr align="left" size="1" width="350"> </td> </tr> <tr> <td width="100%"><font face="Arial">Christian Cryder<br> Internet Architect, <a href="http://atmreports.com">ATMReports.com</a></font></td> </tr> <tr> <td width="100%"> <hr align="left" size="1" width="350"> </td> </tr> <tr> <td width="100%"> <p align="center"><i>"Coffee? I could quit anytime, just not today"<br> <a href="http://seelifedifferently.blogspot.com"><font size="2">http://seelifedifferently.blogspot.com</font></a></i></p> </td> </tr> </tbody> </table> </div> </body> </html> --------------080802060302040105030704--