Hi,

https://issues.apache.org/jira/browse/WICKET-4754
Another user asked for the same several months ago.

But as you found out it is quite easy to roll your own component for this.

About the models: at the
moment org.apache.wicket.markup.html.link.BookmarkablePageLink#getPageParameters
is non-final so you can just override it and return something
dynamic. org.apache.wicket.markup.html.link.BookmarkablePageLink#getPageClass
is final and this is not possible.

If others think this is a good improvement then we can make these changes
for Wicket 7.


On Tue, Aug 6, 2013 at 8:03 PM, Guillaume Smet <[email protected]>wrote:

> Hi all,
>
> On 3 projects now, we had the following problem: we want to build a
> BookmarkablePageLink with parameters which might change during the
> lifecycle of the page (after an Ajax refresh for example): for example
> the urlized name of a project or the version/state of a specific
> entity.
>
> To take a real life example: on artifact-listener.org, we are working
> on adding a Project entity. If, when you display the artifact page,
> the artifact isn't linked to a project, the BookmarkablePageLink is
> not visible (via a setVisible(false) in onConfigure) but it's already
> generated with a static PageParameters with no value for the project
> id. If you link the artifact to a project and you refresh the panel
> via ajax, the link is broken.
>
> The main problem is that PageParameters are static and aren't based on
> models but I think it would be nice to have the pageClass too into a
> model.
>
> We worked around it by implementing a DynamicPageParameters and a
> DynamicBookmarkablePageLink but I'm wondering if it's something that
> bugs other people or if it's just us using weird patterns.
>
> If the former, is it something we should think about for Wicket 7.
>
> --
> Guillaume
>

Reply via email to