You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Wayne W <wa...@gmail.com> on 2014/11/13 11:55:29 UTC
RenderStrategy.ONE_PASS_RENDER possible for single page?
Hi,
We have an issue with hyperlinks Microsoft Word and Excel documents. Its
seems to vary from version and OS, but the long and short of it is that
Word when a user clicks on a link it uses an internal library to try and
access the page, and once it gets a HTTP 200 it will open the default
browser. We have a page that is used for sharing files so it gets added to
documents.
We have several customers complaining they cannot open these links, and I
can verify this seems to happen depending on OS (Mac is worse for example).
After doing a lot of digging about the only thing we can do is make sure we
return a HTTP 200 from the first request, as anything else seems to
sometimes work, sometimes not.
So to my question:
Is it possible to set RenderStrategy.ONE_PASS_RENDER for a single page
only? We don't really want to loose the advantages of the 302 redirect
elsewhere
Any ideas?
many thanks
Wayne
Re: RenderStrategy.ONE_PASS_RENDER possible for single page?
Posted by Wayne W <wa...@gmail.com>.
Ah yes, brilliant - didn't think of that. Thanks Martin - that works a
treat.
On Fri, Nov 14, 2014 at 11:00 AM, Martin Grigorov <mg...@apache.org>
wrote:
> You can setup your own PageRenderer
> via org.apache.wicket.Application#setPageRendererProvider.
> It should return the correct redirect policy per page type.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Nov 14, 2014 at 12:57 PM, Wayne W <wa...@gmail.com>
> wrote:
>
> > Hi,
> >
> > it looks like we cannot make the page stateless as we have many links
> that
> > require the model etc.
> >
> > Martin- regarding RedirectPolicy#Never - is there any way we can 'mark'
> the
> > page to use that? As people are coming to this page from a mount url
> (with
> > a parameter), so we never get a chance to do something like:
> >
> >
> > scheduleRequestHandlerAfterCurrent(new RenderPageRequestHandler(new
> > PageProvider(page),
> >
> > RenderPageRequestHandler.RedirectPolicy.NEVER_REDIRECT));
> >
> >
> >
> >
> > On Thu, Nov 13, 2014 at 8:15 PM, Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> > > See how RequestCycle#setResponsePage() works.
> > > You need to use RedirectPolicy#Never.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Thu, Nov 13, 2014 at 4:56 PM, Sven Meier <sv...@meiers.net> wrote:
> > >
> > > > Hi,
> > > >
> > > > your page doesn't become stateless, just by claiming it to be.
> > > > #setStatelessHint() is just a hint.
> > > >
> > > > Here's a real stateless page:
> > > >
> > > > http://www.wicket-library.com/wicket-examples/stateless/foo
> > > >
> > > > Regards
> > > > Sven
> > > >
> > > >
> > > >
> > > > On 11/13/2014 03:27 PM, Wayne W wrote:
> > > >
> > > >> Hi Sven,
> > > >>
> > > >> I tried setting setStatelessHint(true); but it always does a 302
> > > redirect.
> > > >> I see something like this in the Net panel in Firebug:
> > > >>
> > > >> https://www.example.com/share/df43f 302
> > > >> https://www.example.com/share/df43f?1 200
> > > >>
> > > >> Any idea?
> > > >> thanks
> > > >>
> > > >> On Thu, Nov 13, 2014 at 11:07 AM, Sven Meier <sv...@meiers.net>
> wrote:
> > > >>
> > > >> Hi,
> > > >>>
> > > >>> make your page stateless, then no redirection will occur.
> > > >>>
> > > >>> Sven
> > > >>>
> > > >>>
> > > >>> On 11/13/2014 11:55 AM, Wayne W wrote:
> > > >>>
> > > >>> Hi,
> > > >>>>
> > > >>>> We have an issue with hyperlinks Microsoft Word and Excel
> documents.
> > > Its
> > > >>>> seems to vary from version and OS, but the long and short of it is
> > > that
> > > >>>> Word when a user clicks on a link it uses an internal library to
> try
> > > and
> > > >>>> access the page, and once it gets a HTTP 200 it will open the
> > default
> > > >>>> browser. We have a page that is used for sharing files so it gets
> > > added
> > > >>>> to
> > > >>>> documents.
> > > >>>>
> > > >>>> We have several customers complaining they cannot open these
> links,
> > > and
> > > >>>> I
> > > >>>> can verify this seems to happen depending on OS (Mac is worse for
> > > >>>> example).
> > > >>>> After doing a lot of digging about the only thing we can do is
> make
> > > sure
> > > >>>> we
> > > >>>> return a HTTP 200 from the first request, as anything else seems
> to
> > > >>>> sometimes work, sometimes not.
> > > >>>>
> > > >>>> So to my question:
> > > >>>>
> > > >>>> Is it possible to set RenderStrategy.ONE_PASS_RENDER for a single
> > page
> > > >>>> only? We don't really want to loose the advantages of the 302
> > redirect
> > > >>>> elsewhere
> > > >>>>
> > > >>>> Any ideas?
> > > >>>>
> > > >>>> many thanks
> > > >>>> Wayne
> > > >>>>
> > > >>>>
> > > >>>>
> > ---------------------------------------------------------------------
> > > >>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > >>> For additional commands, e-mail: users-help@wicket.apache.org
> > > >>>
> > > >>>
> > > >>>
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > >
> >
>
Re: RenderStrategy.ONE_PASS_RENDER possible for single page?
Posted by Martin Grigorov <mg...@apache.org>.
You can setup your own PageRenderer
via org.apache.wicket.Application#setPageRendererProvider.
It should return the correct redirect policy per page type.
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Fri, Nov 14, 2014 at 12:57 PM, Wayne W <wa...@gmail.com>
wrote:
> Hi,
>
> it looks like we cannot make the page stateless as we have many links that
> require the model etc.
>
> Martin- regarding RedirectPolicy#Never - is there any way we can 'mark' the
> page to use that? As people are coming to this page from a mount url (with
> a parameter), so we never get a chance to do something like:
>
>
> scheduleRequestHandlerAfterCurrent(new RenderPageRequestHandler(new
> PageProvider(page),
>
> RenderPageRequestHandler.RedirectPolicy.NEVER_REDIRECT));
>
>
>
>
> On Thu, Nov 13, 2014 at 8:15 PM, Martin Grigorov <mg...@apache.org>
> wrote:
>
> > See how RequestCycle#setResponsePage() works.
> > You need to use RedirectPolicy#Never.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Thu, Nov 13, 2014 at 4:56 PM, Sven Meier <sv...@meiers.net> wrote:
> >
> > > Hi,
> > >
> > > your page doesn't become stateless, just by claiming it to be.
> > > #setStatelessHint() is just a hint.
> > >
> > > Here's a real stateless page:
> > >
> > > http://www.wicket-library.com/wicket-examples/stateless/foo
> > >
> > > Regards
> > > Sven
> > >
> > >
> > >
> > > On 11/13/2014 03:27 PM, Wayne W wrote:
> > >
> > >> Hi Sven,
> > >>
> > >> I tried setting setStatelessHint(true); but it always does a 302
> > redirect.
> > >> I see something like this in the Net panel in Firebug:
> > >>
> > >> https://www.example.com/share/df43f 302
> > >> https://www.example.com/share/df43f?1 200
> > >>
> > >> Any idea?
> > >> thanks
> > >>
> > >> On Thu, Nov 13, 2014 at 11:07 AM, Sven Meier <sv...@meiers.net> wrote:
> > >>
> > >> Hi,
> > >>>
> > >>> make your page stateless, then no redirection will occur.
> > >>>
> > >>> Sven
> > >>>
> > >>>
> > >>> On 11/13/2014 11:55 AM, Wayne W wrote:
> > >>>
> > >>> Hi,
> > >>>>
> > >>>> We have an issue with hyperlinks Microsoft Word and Excel documents.
> > Its
> > >>>> seems to vary from version and OS, but the long and short of it is
> > that
> > >>>> Word when a user clicks on a link it uses an internal library to try
> > and
> > >>>> access the page, and once it gets a HTTP 200 it will open the
> default
> > >>>> browser. We have a page that is used for sharing files so it gets
> > added
> > >>>> to
> > >>>> documents.
> > >>>>
> > >>>> We have several customers complaining they cannot open these links,
> > and
> > >>>> I
> > >>>> can verify this seems to happen depending on OS (Mac is worse for
> > >>>> example).
> > >>>> After doing a lot of digging about the only thing we can do is make
> > sure
> > >>>> we
> > >>>> return a HTTP 200 from the first request, as anything else seems to
> > >>>> sometimes work, sometimes not.
> > >>>>
> > >>>> So to my question:
> > >>>>
> > >>>> Is it possible to set RenderStrategy.ONE_PASS_RENDER for a single
> page
> > >>>> only? We don't really want to loose the advantages of the 302
> redirect
> > >>>> elsewhere
> > >>>>
> > >>>> Any ideas?
> > >>>>
> > >>>> many thanks
> > >>>> Wayne
> > >>>>
> > >>>>
> > >>>>
> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > >>> For additional commands, e-mail: users-help@wicket.apache.org
> > >>>
> > >>>
> > >>>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
>
Re: RenderStrategy.ONE_PASS_RENDER possible for single page?
Posted by Wayne W <wa...@gmail.com>.
Hi,
it looks like we cannot make the page stateless as we have many links that
require the model etc.
Martin- regarding RedirectPolicy#Never - is there any way we can 'mark' the
page to use that? As people are coming to this page from a mount url (with
a parameter), so we never get a chance to do something like:
scheduleRequestHandlerAfterCurrent(new RenderPageRequestHandler(new
PageProvider(page),
RenderPageRequestHandler.RedirectPolicy.NEVER_REDIRECT));
On Thu, Nov 13, 2014 at 8:15 PM, Martin Grigorov <mg...@apache.org>
wrote:
> See how RequestCycle#setResponsePage() works.
> You need to use RedirectPolicy#Never.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Nov 13, 2014 at 4:56 PM, Sven Meier <sv...@meiers.net> wrote:
>
> > Hi,
> >
> > your page doesn't become stateless, just by claiming it to be.
> > #setStatelessHint() is just a hint.
> >
> > Here's a real stateless page:
> >
> > http://www.wicket-library.com/wicket-examples/stateless/foo
> >
> > Regards
> > Sven
> >
> >
> >
> > On 11/13/2014 03:27 PM, Wayne W wrote:
> >
> >> Hi Sven,
> >>
> >> I tried setting setStatelessHint(true); but it always does a 302
> redirect.
> >> I see something like this in the Net panel in Firebug:
> >>
> >> https://www.example.com/share/df43f 302
> >> https://www.example.com/share/df43f?1 200
> >>
> >> Any idea?
> >> thanks
> >>
> >> On Thu, Nov 13, 2014 at 11:07 AM, Sven Meier <sv...@meiers.net> wrote:
> >>
> >> Hi,
> >>>
> >>> make your page stateless, then no redirection will occur.
> >>>
> >>> Sven
> >>>
> >>>
> >>> On 11/13/2014 11:55 AM, Wayne W wrote:
> >>>
> >>> Hi,
> >>>>
> >>>> We have an issue with hyperlinks Microsoft Word and Excel documents.
> Its
> >>>> seems to vary from version and OS, but the long and short of it is
> that
> >>>> Word when a user clicks on a link it uses an internal library to try
> and
> >>>> access the page, and once it gets a HTTP 200 it will open the default
> >>>> browser. We have a page that is used for sharing files so it gets
> added
> >>>> to
> >>>> documents.
> >>>>
> >>>> We have several customers complaining they cannot open these links,
> and
> >>>> I
> >>>> can verify this seems to happen depending on OS (Mac is worse for
> >>>> example).
> >>>> After doing a lot of digging about the only thing we can do is make
> sure
> >>>> we
> >>>> return a HTTP 200 from the first request, as anything else seems to
> >>>> sometimes work, sometimes not.
> >>>>
> >>>> So to my question:
> >>>>
> >>>> Is it possible to set RenderStrategy.ONE_PASS_RENDER for a single page
> >>>> only? We don't really want to loose the advantages of the 302 redirect
> >>>> elsewhere
> >>>>
> >>>> Any ideas?
> >>>>
> >>>> many thanks
> >>>> Wayne
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >>> For additional commands, e-mail: users-help@wicket.apache.org
> >>>
> >>>
> >>>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
Re: RenderStrategy.ONE_PASS_RENDER possible for single page?
Posted by Martin Grigorov <mg...@apache.org>.
See how RequestCycle#setResponsePage() works.
You need to use RedirectPolicy#Never.
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Thu, Nov 13, 2014 at 4:56 PM, Sven Meier <sv...@meiers.net> wrote:
> Hi,
>
> your page doesn't become stateless, just by claiming it to be.
> #setStatelessHint() is just a hint.
>
> Here's a real stateless page:
>
> http://www.wicket-library.com/wicket-examples/stateless/foo
>
> Regards
> Sven
>
>
>
> On 11/13/2014 03:27 PM, Wayne W wrote:
>
>> Hi Sven,
>>
>> I tried setting setStatelessHint(true); but it always does a 302 redirect.
>> I see something like this in the Net panel in Firebug:
>>
>> https://www.example.com/share/df43f 302
>> https://www.example.com/share/df43f?1 200
>>
>> Any idea?
>> thanks
>>
>> On Thu, Nov 13, 2014 at 11:07 AM, Sven Meier <sv...@meiers.net> wrote:
>>
>> Hi,
>>>
>>> make your page stateless, then no redirection will occur.
>>>
>>> Sven
>>>
>>>
>>> On 11/13/2014 11:55 AM, Wayne W wrote:
>>>
>>> Hi,
>>>>
>>>> We have an issue with hyperlinks Microsoft Word and Excel documents. Its
>>>> seems to vary from version and OS, but the long and short of it is that
>>>> Word when a user clicks on a link it uses an internal library to try and
>>>> access the page, and once it gets a HTTP 200 it will open the default
>>>> browser. We have a page that is used for sharing files so it gets added
>>>> to
>>>> documents.
>>>>
>>>> We have several customers complaining they cannot open these links, and
>>>> I
>>>> can verify this seems to happen depending on OS (Mac is worse for
>>>> example).
>>>> After doing a lot of digging about the only thing we can do is make sure
>>>> we
>>>> return a HTTP 200 from the first request, as anything else seems to
>>>> sometimes work, sometimes not.
>>>>
>>>> So to my question:
>>>>
>>>> Is it possible to set RenderStrategy.ONE_PASS_RENDER for a single page
>>>> only? We don't really want to loose the advantages of the 302 redirect
>>>> elsewhere
>>>>
>>>> Any ideas?
>>>>
>>>> many thanks
>>>> Wayne
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: RenderStrategy.ONE_PASS_RENDER possible for single page?
Posted by Sven Meier <sv...@meiers.net>.
Hi,
your page doesn't become stateless, just by claiming it to be.
#setStatelessHint() is just a hint.
Here's a real stateless page:
http://www.wicket-library.com/wicket-examples/stateless/foo
Regards
Sven
On 11/13/2014 03:27 PM, Wayne W wrote:
> Hi Sven,
>
> I tried setting setStatelessHint(true); but it always does a 302 redirect.
> I see something like this in the Net panel in Firebug:
>
> https://www.example.com/share/df43f 302
> https://www.example.com/share/df43f?1 200
>
> Any idea?
> thanks
>
> On Thu, Nov 13, 2014 at 11:07 AM, Sven Meier <sv...@meiers.net> wrote:
>
>> Hi,
>>
>> make your page stateless, then no redirection will occur.
>>
>> Sven
>>
>>
>> On 11/13/2014 11:55 AM, Wayne W wrote:
>>
>>> Hi,
>>>
>>> We have an issue with hyperlinks Microsoft Word and Excel documents. Its
>>> seems to vary from version and OS, but the long and short of it is that
>>> Word when a user clicks on a link it uses an internal library to try and
>>> access the page, and once it gets a HTTP 200 it will open the default
>>> browser. We have a page that is used for sharing files so it gets added to
>>> documents.
>>>
>>> We have several customers complaining they cannot open these links, and I
>>> can verify this seems to happen depending on OS (Mac is worse for
>>> example).
>>> After doing a lot of digging about the only thing we can do is make sure
>>> we
>>> return a HTTP 200 from the first request, as anything else seems to
>>> sometimes work, sometimes not.
>>>
>>> So to my question:
>>>
>>> Is it possible to set RenderStrategy.ONE_PASS_RENDER for a single page
>>> only? We don't really want to loose the advantages of the 302 redirect
>>> elsewhere
>>>
>>> Any ideas?
>>>
>>> many thanks
>>> Wayne
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: RenderStrategy.ONE_PASS_RENDER possible for single page?
Posted by Wayne W <wa...@gmail.com>.
Hi Sven,
I tried setting setStatelessHint(true); but it always does a 302 redirect.
I see something like this in the Net panel in Firebug:
https://www.example.com/share/df43f 302
https://www.example.com/share/df43f?1 200
Any idea?
thanks
On Thu, Nov 13, 2014 at 11:07 AM, Sven Meier <sv...@meiers.net> wrote:
> Hi,
>
> make your page stateless, then no redirection will occur.
>
> Sven
>
>
> On 11/13/2014 11:55 AM, Wayne W wrote:
>
>> Hi,
>>
>> We have an issue with hyperlinks Microsoft Word and Excel documents. Its
>> seems to vary from version and OS, but the long and short of it is that
>> Word when a user clicks on a link it uses an internal library to try and
>> access the page, and once it gets a HTTP 200 it will open the default
>> browser. We have a page that is used for sharing files so it gets added to
>> documents.
>>
>> We have several customers complaining they cannot open these links, and I
>> can verify this seems to happen depending on OS (Mac is worse for
>> example).
>> After doing a lot of digging about the only thing we can do is make sure
>> we
>> return a HTTP 200 from the first request, as anything else seems to
>> sometimes work, sometimes not.
>>
>> So to my question:
>>
>> Is it possible to set RenderStrategy.ONE_PASS_RENDER for a single page
>> only? We don't really want to loose the advantages of the 302 redirect
>> elsewhere
>>
>> Any ideas?
>>
>> many thanks
>> Wayne
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: RenderStrategy.ONE_PASS_RENDER possible for single page?
Posted by Sven Meier <sv...@meiers.net>.
Hi,
make your page stateless, then no redirection will occur.
Sven
On 11/13/2014 11:55 AM, Wayne W wrote:
> Hi,
>
> We have an issue with hyperlinks Microsoft Word and Excel documents. Its
> seems to vary from version and OS, but the long and short of it is that
> Word when a user clicks on a link it uses an internal library to try and
> access the page, and once it gets a HTTP 200 it will open the default
> browser. We have a page that is used for sharing files so it gets added to
> documents.
>
> We have several customers complaining they cannot open these links, and I
> can verify this seems to happen depending on OS (Mac is worse for example).
> After doing a lot of digging about the only thing we can do is make sure we
> return a HTTP 200 from the first request, as anything else seems to
> sometimes work, sometimes not.
>
> So to my question:
>
> Is it possible to set RenderStrategy.ONE_PASS_RENDER for a single page
> only? We don't really want to loose the advantages of the 302 redirect
> elsewhere
>
> Any ideas?
>
> many thanks
> Wayne
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org