[ https://issues.apache.org/jira/browse/WICKET-4774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13549701#comment-13549701 ]
Carl-Eric Menzel commented on WICKET-4774: ------------------------------------------ I think it is actually useful to be able to add or change parameters! E.g. I have an application where you can pass in a page parameter to select an entry out of a list. Now if you click on another entry in that list, I would like to update the URL parameter to reflect the newly selected entry. Currently I do that by simply changing the page's existing page parameters. What would be the alternative? > Introduce read-only interface for PageParameters > ------------------------------------------------ > > Key: WICKET-4774 > URL: https://issues.apache.org/jira/browse/WICKET-4774 > Project: Wicket > Issue Type: Improvement > Components: wicket > Affects Versions: 6.0.0 > Reporter: Martin Grigorov > Fix For: 7.0 > > Attachments: WICKET-4774.patch > > > Cuurently org.apache.wicket.Page#getPageParameters() and > org.apache.wicket.request.resource.IResource.Attributes#getParameters() > return a mutable PageParameters. For the latter this is not a problem since > it is not stored and reused for url generation. > In the case with Page#getPageParameters() this instance is live until the > page instance is alive. Some users make a mistake to modify the parameters > (by using #add, #set, #remove) just to create an Url for some other page and > later page's pageparameters are no more the real ones. > We can improve that by introducing an interface with getter methods only. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira