PagePameters is mutable object. I don't think one shared empty instance is a good idea.
-Matej On Sun, May 3, 2009 at 11:44 AM, Johan Compagner <jcompag...@gmail.com> wrote: > make a jira issue for this. > > On Sun, May 3, 2009 at 11:38, Objelean Alex <alex.objel...@gmail.com> wrote: > >> When using getPageParameters(), I used to have some troubles because >> forgetting to call page super(params). As a result, getPageParameters() >> returns null. This problem also occur when working with non bookmarkable >> page. My suggestion is to take advantage of Null Object Pattern >> <http://en.wikipedia.org/wiki/Null_Object_pattern> and >> if the pageParameters object is null to return PageParameters.NULL (empty) >> instance. This way, the client of the code wouldn't have to worry about NPE >> check. Any thoughts? >> Thank you! >> Alex >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org