Furthermore, it is an excellent way of passing models/ other state to pages.
Eelco On 10/24/05, Johan Compagner <[EMAIL PROTECTED]> wrote: > i completely agree with igor. > I use setResponsePage(new XxxPage(yy)) all over the place. > I find this kind of code the most readable what you can get. > No magic. A person can directly see what really happens. > > johan > > > > On 10/24/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > >> 2) to use the page factory your pages can only have the default or > > > >> PageParameter constructors. This prevents you from doing > > > things like > > > >> setResponsePage(new EditUserPage(userId)); > > > > > > That is the price to pay for IoC: you have to let the factory > > > create the beans. > > > BTW I don't think setResponsePage(new ...Page()) is so much > > > useful afterall, since AFAIK it prevents bookmarkable links. > > > > Yes, it prevents bookmarkable pages, but do you need every page to be a > > bookmarkable page? An EditUserPage for example cannot be bookmarkable > > because it needs to know which user to edit. If you start putting > > information like the userId into PageParameters you are creating > > soft-dependencies just like urls. A constructor EditUserPage(long userId) > is > > much more understandable instead of EditUserPage(PageParameters p); > > > > -Igor > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by the JBoss Inc. > > Get Certified Today * Register for a JBoss Training Course > > Free Certification Exam for All Training Attendees Through End of 2005 > > Visit http://www.jboss.com/services/certification for > more information > > _______________________________________________ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user