Bugs item #1177751, was opened at 2005-04-06 13:21 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1177751&group_id=119783
Category: core Group: 1.0.0-rc1 Status: Open Resolution: None Priority: 5 Submitted By: Chris Turner (skipoles) Assigned to: Nobody/Anonymous (nobody) Summary: Pages should be dirty by default? Initial Comment: While testing Wicket clustering support I have come across a common problem in pretty much every example application. This problem is that when a listener is invoked on a page and that page changes its state (usually model value) in some way the page is never marked as dirty. (i.e. pageChanged or modelStateChanged are never called). This is a particular problem in linkomatic and hangman where the same page object is used repeatedly to handle listener events. The result is that session.setAttribute() is therefore never called for that page (other than when the page was first created) and as most clustering implementations cluster changes only when session.setAttribute() is called the page is never synchronized across the cluster. Although not technically a requirement of the Servlet Specification it is generally good practice for an application to call session.setAttribute() whenever the contents of the attribute may have changed as this is often assumed by some session revovery mechanisms. There seem to be two options: 1) Developers must remember to call the appropriate methods to flag their pages as dirty whenever something happens that changes the page or its model. This is how it is currently done and we would need to revisit all Wicket applications to ensure that this happens in every case 2) We change the assumption to be that all pages that receive a listener event are flagged as dirty unless the programmer indicates otherwise. This reverses the current approach of Wicket Option 2 is a better approach as it means that developers building small and medium sized wicket applications do not need to be concerned about page dirtying - it just happens by default. Developers of larger, high scalability applications will already have to be aware of all of the clustering related issues and they can therefore monitor their sessions and make a conscious effort the cancel the dirty flag for cases where they know that the page state or model has not been changed. This approach would be much more consistent with the concept of making Wicket easy to use and program while at the same time making it powerful enough for building complex web applications. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1177751&group_id=119783 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
