You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Wolfgang Schreiner <ws...@csc.com> on 2011/11/07 18:39:24 UTC
ResourceLink and page versioning
Hi all,
I got a couple of questions ...
1) I would like to open a new browser tab and display a PDF when I click a
link. I extended ByteArrayResource but "getData" is not always called.
Seems like once generated the documents get cached and randomly displayed,
which of course is not acceptable, because the PDFs depend on user
selection. How can I fix that?
2) Is there a way to generally disable page versioning
(getPageSettings().setVersionPagesByDefault(false)) but enable versioning
for a single page?
Hope you can help me. Thanks!
w
Re: ResourceLink and page versioning
Posted by Martin Grigorov <mg...@apache.org>.
On Mon, Nov 7, 2011 at 7:39 PM, Wolfgang Schreiner <ws...@csc.com> wrote:
> Hi all,
>
> I got a couple of questions ...
>
> 1) I would like to open a new browser tab and display a PDF when I click a
> link. I extended ByteArrayResource but "getData" is not always called.
> Seems like once generated the documents get cached and randomly displayed,
> which of course is not acceptable, because the PDFs depend on user
> selection. How can I fix that?
Override
org.apache.wicket.request.resource.ByteArrayResource.configureResponse(ResourceResponse,
Attributes)
and call resourceResponse.setCacheDuration(Duration.NONE)
>
> 2) Is there a way to generally disable page versioning
> (getPageSettings().setVersionPagesByDefault(false)) but enable versioning
> for a single page?
Just override MyPage#isVersioned() to return 'true'
>
> Hope you can help me. Thanks!
>
> w
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: ResourceLink and page versioning
Posted by Wolfgang Schreiner <ws...@csc.com>.
One more thing:
I implemented page authentication according to wicketstuff.org. My
application class sets the AuthorizationStrategy in the init method.
"isActionAuthorized" throws a
RestartResponseAtInterceptPageException(Login.class), if the user is not
signed in.
The Login class however throws a ReplaceHandlerException when I invoke
"continueToOriginalDestination", and the original page is not displayed.
Am I missing something? I have to get this to work.
Thanks
From:
Wolfgang Schreiner/AUT/CSC@CSC
To:
users@wicket.apache.org
Date:
07.11.2011 18:40
Subject:
ResourceLink and page versioning
Hi all,
I got a couple of questions ...
1) I would like to open a new browser tab and display a PDF when I click a
link. I extended ByteArrayResource but "getData" is not always called.
Seems like once generated the documents get cached and randomly displayed,
which of course is not acceptable, because the PDFs depend on user
selection. How can I fix that?
2) Is there a way to generally disable page versioning
(getPageSettings().setVersionPagesByDefault(false)) but enable versioning
for a single page?
Hope you can help me. Thanks!
w