Re: 答复: What is the Wicket way to redirect?

2008-05-01 Thread Martijn Dashorst
On 5/1/08, Andrew Broderick <[EMAIL PROTECTED]> wrote:
> FYI, what's wrong with the Javadoc is that for RestartResponseException, it 
> says:

"Causes wicket to interrupt current request processing and immediately
respond with the specified page."

> And for RestartResponseAtInterceptPageException, it says:

"Causes Wicket to interrupt current request processing and immediately
redirect to an intercept page. Similar to calling
redirectToInteceptPage(Page) with the difference that this exception
will interrupt processing of the current request."

>  This says nothing about what the differences between the two are.

Actually it does: one goes to the specified page, the other goes to an
intercept page. If this is not clear enough, you can open up
redirectToInterceptPage(Page) and read there: "Redirects browser to an
intermediate page such as a sign-in page."

But if you have a better description, you are welcome to submit a patch.

Martijn

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 答复: What is the Wicket way to redirect?

2008-05-01 Thread Maurice Marrink
In defense of the "oldtimers". We do see a lot of questions recurring
regularly (not talking about any question in particular), even if an
answer has been documented for it. Sometimes people do not search for
it.
That being said we are only humans here, sometimes we had a bad day
and what seems like a normal question will get shotdown. Please try to
understand that we do want to help people but sometimes a question or
response is misread/ interpreted.
In my opinion there are mailinglists where people get a rtfm far often
then we do here.

Maurice

2008/5/1 Andrew Broderick <[EMAIL PROTECTED]>:
> If there's one fault with this otherwise great mailing list, it's the 
> attitude that the old-timers have towards the newbies. The guy asked a simple 
> question.
>
>  FYI, what's wrong with the Javadoc is that for RestartResponseException, it 
> says:
>
>  " Causes wicket to interrupt current request processing and immediately 
> respond with the specified page."
>
>  And for RestartResponseAtInterceptPageException, it says:
>
>  " Causes Wicket to interrupt current request processing and immediately 
> redirect to an intercept page.
>  Similar to calling redirectToInteceptPage(Page) with the difference that 
> this exception will interrupt processing of the current request."
>
>  This says nothing about what the differences between the two are. So, guys, 
> if you want Wicket to attain widespread adoption, please don't shoot back at 
> anyone who asks a question with a response of RTFM. Take the time to explain 
> stuff. (This also contributes to the Wicket knowledge base, as it remains in 
> the list archives, and hence shows up in Google searches).
>
>  -Andrew
>
>
>
>
>  -Original Message-----
>  From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
>  Sent: Thursday, May 01, 2008 9:14 AM
>  To: users@wicket.apache.org
>  Subject: Re: 答复: What is the Wicket way to redirect?
>
>  What is wrong with the javadoc?
>
>  Martijn
>
>  On 5/1/08, Jay <[EMAIL PROTECTED]> wrote:
>  > Hi, Igor
>  >
>  >  What's the difference between "RestartResponseException" and
>  >  "RestartResponseAtInterceptPageException"? Thx
>  >
>  >
>  >  Regards,
>  >  Jay
>  >
>  >  -邮件原件-
>  >  发件人: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  发送时间: 2008年2月21日 7:03
>  >  收件人: users@wicket.apache.org
>  >  主题: Re: What is the Wicket way to redirect?
>  >
>  >
>  >  s/error/session.error/
>  >  s/setresponsepage/throw new restartresponseexception
>  >
>  >  -igor
>  >
>  >
>  >  On Wed, Feb 20, 2008 at 2:54 PM, MYoung <[EMAIL PROTECTED]> wrote:
>  >  >
>  >  >  In my Checkout page if there is nothing to checkout, I want to bounce 
> to
>  >  the
>  >  >  ShowCatalog page with an error message.  I did it this way:
>  >  >
>  >  >  class Checkout extends WebPage {
>  >  > public Checkout() {
>  >  > if (thereIsNothingToCheckout()) {
>  >  > error("You have nothing to checkout");
>  >  > setResponsePage(ShowCatalog.class);
>  >  > return;
>  >  > }
>  >  >
>  >  > // continue to checkout
>  >  >
>  >  > }
>  >  >  }
>  >  >
>  >  >  Is this the right way?
>  >  >  --
>  >  >  View this message in context:
>  >  
> http://www.nabble.com/What-is-the-Wicket-way-to-redirect--tp15600869p1560086
>  >  9.html
>  >  >  Sent from the Wicket - User mailing list archive at Nabble.com.
>  >  >
>  >  >
>  >  >  -
>  >  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >  >
>  >  >
>  >
>  >  -
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>  >  -
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>
>  --
>  Buy Wicket in Action: http://manning.com/dashorst
>  Apache Wicket 1.3.3 is released
>  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3
>
>  ___
>
>  The  information in this email or in any file attached
>  hereto is intended only for the personal and confiden-
>  tial  use  of  the individual or entity to which it is
>  addressed and may contain information that is  propri-
>  etary  and  confidential.  If you are not the intended
>  recipient of this message you are hereby notified that
>  any  review, dissemination, distribution or copying of
>  this message is strictly prohibited.  This  communica-
>  tion  is  for information purposes only and should not
>  be regarded as an offer to sell or as  a  solicitation
>  of an offer to buy any financial product. Email trans-
>  mission cannot be guaranteed to be  secure  or  error-
>  free. P6070214
>


RE: 答复: What is the Wicket way to redirect?

2008-05-01 Thread Andrew Broderick
If there's one fault with this otherwise great mailing list, it's the attitude 
that the old-timers have towards the newbies. The guy asked a simple question.

FYI, what's wrong with the Javadoc is that for RestartResponseException, it 
says:

" Causes wicket to interrupt current request processing and immediately respond 
with the specified page."

And for RestartResponseAtInterceptPageException, it says:

" Causes Wicket to interrupt current request processing and immediately 
redirect to an intercept page.
Similar to calling redirectToInteceptPage(Page) with the difference that this 
exception will interrupt processing of the current request."

This says nothing about what the differences between the two are. So, guys, if 
you want Wicket to attain widespread adoption, please don't shoot back at 
anyone who asks a question with a response of RTFM. Take the time to explain 
stuff. (This also contributes to the Wicket knowledge base, as it remains in 
the list archives, and hence shows up in Google searches).

-Andrew


-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 01, 2008 9:14 AM
To: users@wicket.apache.org
Subject: Re: 答复: What is the Wicket way to redirect?

What is wrong with the javadoc?

Martijn

On 5/1/08, Jay <[EMAIL PROTECTED]> wrote:
> Hi, Igor
>
>  What's the difference between "RestartResponseException" and
>  "RestartResponseAtInterceptPageException"? Thx
>
>
>  Regards,
>  Jay
>
>  -邮件原件-
>  发件人: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  发送时间: 2008年2月21日 7:03
>  收件人: users@wicket.apache.org
>  主题: Re: What is the Wicket way to redirect?
>
>
>  s/error/session.error/
>  s/setresponsepage/throw new restartresponseexception
>
>  -igor
>
>
>  On Wed, Feb 20, 2008 at 2:54 PM, MYoung <[EMAIL PROTECTED]> wrote:
>  >
>  >  In my Checkout page if there is nothing to checkout, I want to bounce to
>  the
>  >  ShowCatalog page with an error message.  I did it this way:
>  >
>  >  class Checkout extends WebPage {
>  > public Checkout() {
>  > if (thereIsNothingToCheckout()) {
>  > error("You have nothing to checkout");
>  > setResponsePage(ShowCatalog.class);
>  > return;
>  > }
>  >
>  > // continue to checkout
>  >
>  > }
>  >  }
>  >
>  >  Is this the right way?
>  >  --
>  >  View this message in context:
>  http://www.nabble.com/What-is-the-Wicket-way-to-redirect--tp15600869p1560086
>  9.html
>  >  Sent from the Wicket - User mailing list archive at Nabble.com.
>  >
>  >
>  >  -
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


Re: 答复: What is the Wicket way to redirect?

2008-05-01 Thread Martijn Dashorst
What is wrong with the javadoc?

Martijn

On 5/1/08, Jay <[EMAIL PROTECTED]> wrote:
> Hi, Igor
>
>  What's the difference between "RestartResponseException" and
>  "RestartResponseAtInterceptPageException"? Thx
>
>
>  Regards,
>  Jay
>
>  -邮件原件-
>  发件人: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  发送时间: 2008年2月21日 7:03
>  收件人: users@wicket.apache.org
>  主题: Re: What is the Wicket way to redirect?
>
>
>  s/error/session.error/
>  s/setresponsepage/throw new restartresponseexception
>
>  -igor
>
>
>  On Wed, Feb 20, 2008 at 2:54 PM, MYoung <[EMAIL PROTECTED]> wrote:
>  >
>  >  In my Checkout page if there is nothing to checkout, I want to bounce to
>  the
>  >  ShowCatalog page with an error message.  I did it this way:
>  >
>  >  class Checkout extends WebPage {
>  > public Checkout() {
>  > if (thereIsNothingToCheckout()) {
>  > error("You have nothing to checkout");
>  > setResponsePage(ShowCatalog.class);
>  > return;
>  > }
>  >
>  > // continue to checkout
>  >
>  > }
>  >  }
>  >
>  >  Is this the right way?
>  >  --
>  >  View this message in context:
>  http://www.nabble.com/What-is-the-Wicket-way-to-redirect--tp15600869p1560086
>  9.html
>  >  Sent from the Wicket - User mailing list archive at Nabble.com.
>  >
>  >
>  >  -
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3