Links in wicket work by calling the urlFor method of the request cycle. This includes a URL renderer which all URLs are passed through when they are being generated.
If you:
- Write a sub class for
UrlRenderer
to add yourthemePreview
parameter to all urls if it was a parameter in the request - Write a sub class of
RequestCycle
and override thenewUrlRenderer()
to return yourUrlRenderer
. - Create your own implementation of
IRequestCycleProvider
to provide your customRequestCycle
- In your application class, in the
init
method, callsetRequestCycleProvider
passing your customIRequestCycleProvider
.
This way, if the themePreview
parameter is present in a request, it will be automatically added to any URL that is generated and so will be present on any link within your iframe.
solved Set application state in iframe only