You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by armhold <ar...@gmail.com> on 2011/11/05 03:12:34 UTC
Wicket 1.5 - setResponsePage() - page still tries to render HTML
before redirect
Hi,
Geoff Hayman raised this issue previously here:
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-setResponsePage-page-still-tries-to-render-HTML-before-redirect-td3819145.html
but apparently got no response (and Nabble won't let me reply to that for
some reason... conspiracy?)
I've run into the same issue- with 1.5, you can no longer short-circuit the
constructor of a page, as Wicket complains if all the components haven't
been added so as to match the HTML. I often use this for things like access
control- if some condition isn't met, set the response to another page
without rendering any components. If this is an improper use of the
framework, what is the correct pattern for dealing with this?
I can work around this by rendering dummy data to my components, but that's
rather ugly.
Thanks
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-setResponsePage-page-still-tries-to-render-HTML-before-redirect-tp3992321p3992321.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket 1.5 - setResponsePage() - page still tries to render HTML
before redirect
Posted by Martin Grigorov <mg...@apache.org>.
On Sat, Nov 5, 2011 at 6:50 AM, <bh...@actrix.gen.nz> wrote:
> Hi,
>
> To abort the construction of the page, you throw
> ResetResponseException or subclasses.
Yes,
RestartResponseException should be used instead of setResponsePage()
>
> Regards,
>
> Bernard
>
>
> On Fri, 4 Nov 2011 19:12:34 -0700 (PDT), you wrote:
>
>>Hi,
>>
>>Geoff Hayman raised this issue previously here:
>>http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-setResponsePage-page-still-tries-to-render-HTML-before-redirect-td3819145.html
>>
>>but apparently got no response (and Nabble won't let me reply to that for
>>some reason... conspiracy?)
>>
>>I've run into the same issue- with 1.5, you can no longer short-circuit the
>>constructor of a page, as Wicket complains if all the components haven't
>>been added so as to match the HTML. I often use this for things like access
>>control- if some condition isn't met, set the response to another page
>>without rendering any components. If this is an improper use of the
>>framework, what is the correct pattern for dealing with this?
>>
>>I can work around this by rendering dummy data to my components, but that's
>>rather ugly.
>>
>>Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
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: Wicket 1.5 - setResponsePage() - page still tries to render
HTML before redirect
Posted by armhold <ar...@gmail.com>.
Beautiful, thank you.
George
On Nov 5, 2011, at 12:46 AM, bht [via Apache Wicket] wrote:
> Hi,
>
> To abort the construction of the page, you throw
> ResetResponseException or subclasses.
>
> Regards,
>
> Bernard
>
>
> On Fri, 4 Nov 2011 19:12:34 -0700 (PDT), you wrote:
>
> >Hi,
> >
> >Geoff Hayman raised this issue previously here:
> >http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-setResponsePage-page-still-tries-to-render-HTML-before-redirect-td3819145.html
> >
> >but apparently got no response (and Nabble won't let me reply to that for
> >some reason... conspiracy?)
> >
> >I've run into the same issue- with 1.5, you can no longer short-circuit the
> >constructor of a page, as Wicket complains if all the components haven't
> >been added so as to match the HTML. I often use this for things like access
> >control- if some condition isn't met, set the response to another page
> >without rendering any components. If this is an improper use of the
> >framework, what is the correct pattern for dealing with this?
> >
> >I can work around this by rendering dummy data to my components, but that's
> >rather ugly.
> >
> >Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-setResponsePage-page-still-tries-to-render-HTML-before-redirect-tp3992321p3992468.html
> To unsubscribe from Wicket 1.5 - setResponsePage() - page still tries to render HTML before redirect, click here.
--
George Armhold
armhold@gmail.com
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-setResponsePage-page-still-tries-to-render-HTML-before-redirect-tp3992321p3993146.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket 1.5 - setResponsePage() - page still tries to render HTML before redirect
Posted by bh...@actrix.gen.nz.
Hi,
To abort the construction of the page, you throw
ResetResponseException or subclasses.
Regards,
Bernard
On Fri, 4 Nov 2011 19:12:34 -0700 (PDT), you wrote:
>Hi,
>
>Geoff Hayman raised this issue previously here:
>http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-setResponsePage-page-still-tries-to-render-HTML-before-redirect-td3819145.html
>
>but apparently got no response (and Nabble won't let me reply to that for
>some reason... conspiracy?)
>
>I've run into the same issue- with 1.5, you can no longer short-circuit the
>constructor of a page, as Wicket complains if all the components haven't
>been added so as to match the HTML. I often use this for things like access
>control- if some condition isn't met, set the response to another page
>without rendering any components. If this is an improper use of the
>framework, what is the correct pattern for dealing with this?
>
>I can work around this by rendering dummy data to my components, but that's
>rather ugly.
>
>Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org