Re: AjaxSubmitLink + setResponsePage = feedback message problem on new page

2016-05-19 Thread Sebastien
> but I am not getting feedback message when there is some error.

In case of a redirection, you need to notify the message to the session,
not to the page/component.
ie: Session.get().warn(message);





On Thu, May 19, 2016 at 11:04 AM, Martin Grigorov 
wrote:

> Hi,
>
> If you use AjaxLink then you don't submit any data. You may try
> AjaxSubmitLink instead.
>
> Please give more information about "but setResponsePage is not working".
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, May 19, 2016 at 10:11 AM, Sarang  wrote:
>
> > Hello Josh,
> >
> > I am stuck in similar situation only. When I hit on the link, I want to
> > show
> > feedback message if there are some mandatory fields unfilled otherwise I
> > want to redirect using setResponsePage. If i use AjaxLink then I get
> > feedback message properly but setResponsePage is not working. When I use
> > SubmitLink, setResponsePage works fine but I am not getting feedback
> > message
> > when there is some error.
> >
> > Can you please suggest how can I solve this ?
> >
> > Thanks,
> > Sarang
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/AjaxSubmitLink-setResponsePage-feedback-message-problem-on-new-page-tp1843719p4674751.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Re: AjaxSubmitLink + setResponsePage = feedback message problem on new page

2016-05-19 Thread Martin Grigorov
Hi,

If you use AjaxLink then you don't submit any data. You may try
AjaxSubmitLink instead.

Please give more information about "but setResponsePage is not working".

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, May 19, 2016 at 10:11 AM, Sarang  wrote:

> Hello Josh,
>
> I am stuck in similar situation only. When I hit on the link, I want to
> show
> feedback message if there are some mandatory fields unfilled otherwise I
> want to redirect using setResponsePage. If i use AjaxLink then I get
> feedback message properly but setResponsePage is not working. When I use
> SubmitLink, setResponsePage works fine but I am not getting feedback
> message
> when there is some error.
>
> Can you please suggest how can I solve this ?
>
> Thanks,
> Sarang
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxSubmitLink-setResponsePage-feedback-message-problem-on-new-page-tp1843719p4674751.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: AjaxSubmitLink + setResponsePage = feedback message problem on new page

2016-05-19 Thread Sarang
Hello Josh,

I am stuck in similar situation only. When I hit on the link, I want to show
feedback message if there are some mandatory fields unfilled otherwise I
want to redirect using setResponsePage. If i use AjaxLink then I get
feedback message properly but setResponsePage is not working. When I use
SubmitLink, setResponsePage works fine but I am not getting feedback message
when there is some error.

Can you please suggest how can I solve this ?

Thanks,
Sarang

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSubmitLink-setResponsePage-feedback-message-problem-on-new-page-tp1843719p4674751.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSubmitLink + setResponsePage = feedback message problem on new page

2012-11-26 Thread sadiq81
Thx for this post, it also helped me :)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSubmitLink-setResponsePage-feedback-message-problem-on-new-page-tp1843719p4654214.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSubmitLink + setResponsePage = feedback message problem on new page

2010-01-27 Thread Josh Kamau
Just wondering;

Isnt ajax supposed to update components on the same page? If you want to
redirect to another page then you dont need an ajax link.  Try with a normal
link. Then try without setting response page but add the feedback panel on
the same page.



On Wed, Jan 27, 2010 at 9:15 PM, Wayne Pope 
waynemailingli...@googlemail.com wrote:

 Hello all,

 Ok I cannot figure this one out.
 I have a  Page that contains a Form with a AjaxSubmitLink:

 AjaxSubmitLink submitLink= new AjaxSubmitLink(submitLink) {
@Override
protected void onSubmit(AjaxRequestTarget target,
 Form? form) {

info(getString(admin.paymentSuccesfull));

  setResponsePage(Application.get().getHomePage());
}

@Override
protected void onError(AjaxRequestTarget target,
 Form? form) {
target.addComponent(feedback);
}
};


 On the home page I have a Panel that contains a FeedbackPanel - this
 feedback panel works fine when using elements on that page.

 However when submitting the form and displaying the home page I get
 the message in the logs:

 Component-targetted feedback message was left unrendered. This could
 be because you are missing a FeedbackPanel on the page.  Message:
 [FeedbackMessage message =  ...

 And the message is not displayed.

 Any ideas why wicket cannot find the feedback panel in the page? (its
 definitely there in a Panel)

 feedback panel is added as such:
 FeedbackPanel feedback = new FeedbackPanel(feedbackPanel);
 add(feedback);


 many thanks
 Wayne

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: AjaxSubmitLink + setResponsePage = feedback message problem on new page

2010-01-27 Thread Igor Vaynberg
the problem is that there is a redirect between your calling info()
and the feedback panel rendering. this is because thats the only way
to do it in ajax  - issue a window.location=...

if you are doing feedback messages across requests then use
getsession().info(...)

-igor

On Wed, Jan 27, 2010 at 10:15 AM, Wayne Pope
waynemailingli...@googlemail.com wrote:
 Hello all,

 Ok I cannot figure this one out.
 I have a  Page that contains a Form with a AjaxSubmitLink:

 AjaxSubmitLink submitLink= new AjaxSubmitLink(submitLink) {
                       �...@override
                        protected void onSubmit(AjaxRequestTarget target, 
 Form? form) {

                                info(getString(admin.paymentSuccesfull));
                                
 setResponsePage(Application.get().getHomePage());
                        }

                       �...@override
                        protected void onError(AjaxRequestTarget target, 
 Form? form) {
                                target.addComponent(feedback);
                        }
                };


 On the home page I have a Panel that contains a FeedbackPanel - this
 feedback panel works fine when using elements on that page.

 However when submitting the form and displaying the home page I get
 the message in the logs:

 Component-targetted feedback message was left unrendered. This could
 be because you are missing a FeedbackPanel on the page.  Message:
 [FeedbackMessage message =  ...

 And the message is not displayed.

 Any ideas why wicket cannot find the feedback panel in the page? (its
 definitely there in a Panel)

 feedback panel is added as such:
 FeedbackPanel feedback = new FeedbackPanel(feedbackPanel);
 add(feedback);


 many thanks
 Wayne

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSubmitLink + setResponsePage = feedback message problem on new page

2010-01-27 Thread Riyad Kalla
Igor, will FeedbackPanel correctly consume the messages from the session
scope and remove them -- or do you have to manually remove them once they've
been rendered?

On Wed, Jan 27, 2010 at 11:42 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 the problem is that there is a redirect between your calling info()
 and the feedback panel rendering. this is because thats the only way
 to do it in ajax  - issue a window.location=...

 if you are doing feedback messages across requests then use
 getsession().info(...)

 -igor

 On Wed, Jan 27, 2010 at 10:15 AM, Wayne Pope
 waynemailingli...@googlemail.com wrote:
  Hello all,
 
  Ok I cannot figure this one out.
  I have a  Page that contains a Form with a AjaxSubmitLink:
 
  AjaxSubmitLink submitLink= new AjaxSubmitLink(submitLink) {
 @Override
 protected void onSubmit(AjaxRequestTarget target,
 Form? form) {
 
 
  info(getString(admin.paymentSuccesfull));
 
  setResponsePage(Application.get().getHomePage());
 }
 
 @Override
 protected void onError(AjaxRequestTarget target,
 Form? form) {
 target.addComponent(feedback);
 }
 };
 
 
  On the home page I have a Panel that contains a FeedbackPanel - this
  feedback panel works fine when using elements on that page.
 
  However when submitting the form and displaying the home page I get
  the message in the logs:
 
  Component-targetted feedback message was left unrendered. This could
  be because you are missing a FeedbackPanel on the page.  Message:
  [FeedbackMessage message =  ...
 
  And the message is not displayed.
 
  Any ideas why wicket cannot find the feedback panel in the page? (its
  definitely there in a Panel)
 
  feedback panel is added as such:
  FeedbackPanel feedback = new FeedbackPanel(feedbackPanel);
  add(feedback);
 
 
  many thanks
  Wayne
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: AjaxSubmitLink + setResponsePage = feedback message problem on new page

2010-01-27 Thread Igor Vaynberg
the former

-igor

On Wed, Jan 27, 2010 at 10:45 AM, Riyad Kalla rka...@gmail.com wrote:
 Igor, will FeedbackPanel correctly consume the messages from the session
 scope and remove them -- or do you have to manually remove them once they've
 been rendered?

 On Wed, Jan 27, 2010 at 11:42 AM, Igor Vaynberg 
 igor.vaynb...@gmail.comwrote:

 the problem is that there is a redirect between your calling info()
 and the feedback panel rendering. this is because thats the only way
 to do it in ajax  - issue a window.location=...

 if you are doing feedback messages across requests then use
 getsession().info(...)

 -igor

 On Wed, Jan 27, 2010 at 10:15 AM, Wayne Pope
 waynemailingli...@googlemail.com wrote:
  Hello all,
 
  Ok I cannot figure this one out.
  I have a  Page that contains a Form with a AjaxSubmitLink:
 
  AjaxSubmitLink submitLink= new AjaxSubmitLink(submitLink) {
                        �...@override
                         protected void onSubmit(AjaxRequestTarget target,
 Form? form) {
 
 
  info(getString(admin.paymentSuccesfull));
 
  setResponsePage(Application.get().getHomePage());
                         }
 
                        �...@override
                         protected void onError(AjaxRequestTarget target,
 Form? form) {
                                 target.addComponent(feedback);
                         }
                 };
 
 
  On the home page I have a Panel that contains a FeedbackPanel - this
  feedback panel works fine when using elements on that page.
 
  However when submitting the form and displaying the home page I get
  the message in the logs:
 
  Component-targetted feedback message was left unrendered. This could
  be because you are missing a FeedbackPanel on the page.  Message:
  [FeedbackMessage message =  ...
 
  And the message is not displayed.
 
  Any ideas why wicket cannot find the feedback panel in the page? (its
  definitely there in a Panel)
 
  feedback panel is added as such:
  FeedbackPanel feedback = new FeedbackPanel(feedbackPanel);
  add(feedback);
 
 
  many thanks
  Wayne
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSubmitLink + setResponsePage = feedback message problem on new page

2010-01-27 Thread Wayne Pope
thanks for the explanation. Works perfect now.

much appreciated.

On Wed, Jan 27, 2010 at 8:23 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 the former

 -igor

 On Wed, Jan 27, 2010 at 10:45 AM, Riyad Kalla rka...@gmail.com wrote:
 Igor, will FeedbackPanel correctly consume the messages from the session
 scope and remove them -- or do you have to manually remove them once they've
 been rendered?

 On Wed, Jan 27, 2010 at 11:42 AM, Igor Vaynberg 
 igor.vaynb...@gmail.comwrote:

 the problem is that there is a redirect between your calling info()
 and the feedback panel rendering. this is because thats the only way
 to do it in ajax  - issue a window.location=...

 if you are doing feedback messages across requests then use
 getsession().info(...)

 -igor

 On Wed, Jan 27, 2010 at 10:15 AM, Wayne Pope
 waynemailingli...@googlemail.com wrote:
  Hello all,
 
  Ok I cannot figure this one out.
  I have a  Page that contains a Form with a AjaxSubmitLink:
 
  AjaxSubmitLink submitLink= new AjaxSubmitLink(submitLink) {
                        �...@override
                         protected void onSubmit(AjaxRequestTarget target,
 Form? form) {
 
 
  info(getString(admin.paymentSuccesfull));
 
  setResponsePage(Application.get().getHomePage());
                         }
 
                        �...@override
                         protected void onError(AjaxRequestTarget target,
 Form? form) {
                                 target.addComponent(feedback);
                         }
                 };
 
 
  On the home page I have a Panel that contains a FeedbackPanel - this
  feedback panel works fine when using elements on that page.
 
  However when submitting the form and displaying the home page I get
  the message in the logs:
 
  Component-targetted feedback message was left unrendered. This could
  be because you are missing a FeedbackPanel on the page.  Message:
  [FeedbackMessage message =  ...
 
  And the message is not displayed.
 
  Any ideas why wicket cannot find the feedback panel in the page? (its
  definitely there in a Panel)
 
  feedback panel is added as such:
  FeedbackPanel feedback = new FeedbackPanel(feedbackPanel);
  add(feedback);
 
 
  many thanks
  Wayne
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org