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
UrlRendererto add yourthemePreviewparameter to all urls if it was a parameter in the request - Write a sub class of
RequestCycleand override thenewUrlRenderer()to return yourUrlRenderer. - Create your own implementation of
IRequestCycleProviderto provide your customRequestCycle - In your application class, in the
initmethod, callsetRequestCycleProviderpassing 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