Hi, thanks for your reply. I used the @SpringBean annotation in combination with the transient keyword. I thought that all @SpringBean marked objects would get serialized when the field was not made transient. So this is not the case? What will be serialized when the serialization routine tries to serialized the private members marked with @SpringBean? How will these objects be reinitialized after a page got deserialized?
Martijn Dashorst wrote: > > It works and I don't see any inherent dangers, but is there any reason > why you can't use the @SpringBean annotation, which makes the spring > reference a proxy rather than a transient field? It is quite easy to > forget to add 'transient' to the field :) > > Martijn > > On 7/9/07, Tom Desmet <[EMAIL PROTECTED]> wrote: >> >> Hi all, >> >> I have a question on using wicket with the spring injector. >> I would like to create extra-lightweight webpages, and this means that >> I don't want to serialize all page dependencies (dao's and business >> objects >> that are member variables of the pages). >> >> I want all dao's and business objects to be injected when they are >> required >> on the page. >> So the injector supplies all necessary objects to the page on page >> construction. All dao's and business objects are transient, so that they >> are >> not serialized when a page gets stored in the pagemap. >> >> When a webpage gets deserialized by using the browsers back button, these >> transient >> fields are (evidently) null. So I would like to re-attach all the >> requirements that the page needs. >> >> I found out that this can be achieved by invoking the injector in the >> "onAttach" method of the webpage. >> >> "InjectorHolder.getInjector().inject(this);" >> >> Is this a good practice, or are there objections on doing this? >> Any help of all you guys is very much appreciated! Thanks in advance for >> any >> replies. >> >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/Detaching-your-spring-dao%27s---business-objects-from-webpage-tf4048133.html#a11498533 >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > -- > Wicket joins the Apache Software Foundation as Apache Wicket > Apache Wicket 1.3.0-beta2 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > -- View this message in context: http://www.nabble.com/Detaching-your-spring-dao%27s---business-objects-from-webpage-tf4048133.html#a11498972 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user