Re: [Wicket-user] Partial page rendering with AjaxSubmitButton

2007-05-16 Thread Igor Vaynberg

On 5/16/07, Mark van Leeuwen <[EMAIL PROTECTED]> wrote:


As you can probably gather I am new to Wicket.

If session expiry is the cause of the problem, shouldn't that somehow be
communicated back to the user? How can I detect session expiry with an
AJAX
submit and then handle it appropriately?



we have this fixed in 1.3. if ajax hits an expired page error it will show
the page expired page, just like a regular request.

-igor
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Partial page rendering with AjaxSubmitButton

2007-05-16 Thread Mark van Leeuwen
As you can probably gather I am new to Wicket.

If session expiry is the cause of the problem, shouldn't that somehow be
communicated back to the user? How can I detect session expiry with an AJAX
submit and then handle it appropriately?

The problem with the AJAX "Form Example" run from www.wicket-library.com is
different. The AJAX submit button never works - at least for me. Can someone
else please verify that?

Mark
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:wicket-user-
> [EMAIL PROTECTED] On Behalf Of Matej Knopp
> Sent: Thursday, 17 May 2007 7:49 AM
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user] Partial page rendering with AjaxSubmitButton
> 
> But there must be a reason why pagemap is returned as null. Session
> expiration maybe?
> 
> -Matej
> 
> On 5/16/07, Mark van Leeuwen <[EMAIL PROTECTED]> wrote:
> > > From: [EMAIL PROTECTED] [mailto:wicket-user-
> > > [EMAIL PROTECTED] On Behalf Of Matej Knopp
> > > Sent: Wednesday, 16 May 2007 7:17 PM
> > > To: wicket-user@lists.sourceforge.net
> > > Subject: Re: [Wicket-user] Partial page rendering with
> AjaxSubmitButton
> > >
> > > 1. Yes, it should be invoked.
> >
> > I get the same and other errors with the AJAX "Form Example" on
> > http://www.wicket-library.com/wicket-examples/ajax.
> >
> > Without entering Name or Email, clicking the "submit via ajax" button
> does
> > not display error messages. However clicking the non-ajax "submit"
> button
> > does display errors.
> >
> > Curiously, when I downloaded the examples (ver 1.2.6) and ran them
> locally
> > it works correctly at first. However if I wait a few minutes, then the
> ajax
> > submit stops working.
> >
> > The issue seems to be in the following code from
> > DefaultRequestTargetResolverStrategy.java:
> >
> > Session session = Session.get();
> > PageMap pageMap =
> session.pageMapForName(requestParameters.getPageMapName(),
> > false);
> > if (pageMap == null)
> > {
> > // requested pagemap no longer exists - ignore this
> > // request
> > processRequest = false;
> > }
> >
> > In the above code, the ajax submit fails to do anything when pageMap is
> > returned as null.
> >
> >
> > >
> > > 2. form.replaceWith(anotherComponent);
> > >
> > > -Matej
> > >
> > > On 5/16/07, Mark van Leeuwen <[EMAIL PROTECTED]> wrote:
> > > > I have a form on a page which I want to replace with another form
> when a
> > > > Next button is pressed. I want to do this with AJAX. The form should
> > > only be
> > > > replaced if there are no validation errors.
> > > >
> > > > Two questions:
> > > > - the AjaxSubmitButton.onSubmit method is not being invoked when the
> > > button
> > > > is clicked. Should I expect it to be?
> > > > - assuming that it was invoked, how can can I replace the enclosing
> form
> > > > with a new form?
> > > >
> > > > Mark
> >
> >
> > 
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Partial page rendering with AjaxSubmitButton

2007-05-16 Thread Matej Knopp
But there must be a reason why pagemap is returned as null. Session
expiration maybe?

-Matej

On 5/16/07, Mark van Leeuwen <[EMAIL PROTECTED]> wrote:
> > From: [EMAIL PROTECTED] [mailto:wicket-user-
> > [EMAIL PROTECTED] On Behalf Of Matej Knopp
> > Sent: Wednesday, 16 May 2007 7:17 PM
> > To: wicket-user@lists.sourceforge.net
> > Subject: Re: [Wicket-user] Partial page rendering with AjaxSubmitButton
> >
> > 1. Yes, it should be invoked.
>
> I get the same and other errors with the AJAX "Form Example" on
> http://www.wicket-library.com/wicket-examples/ajax.
>
> Without entering Name or Email, clicking the "submit via ajax" button does
> not display error messages. However clicking the non-ajax "submit" button
> does display errors.
>
> Curiously, when I downloaded the examples (ver 1.2.6) and ran them locally
> it works correctly at first. However if I wait a few minutes, then the ajax
> submit stops working.
>
> The issue seems to be in the following code from
> DefaultRequestTargetResolverStrategy.java:
>
> Session session = Session.get();
> PageMap pageMap = session.pageMapForName(requestParameters.getPageMapName(),
> false);
> if (pageMap == null)
> {
> // requested pagemap no longer exists - ignore this
> // request
> processRequest = false;
> }
>
> In the above code, the ajax submit fails to do anything when pageMap is
> returned as null.
>
>
> >
> > 2. form.replaceWith(anotherComponent);
> >
> > -Matej
> >
> > On 5/16/07, Mark van Leeuwen <[EMAIL PROTECTED]> wrote:
> > > I have a form on a page which I want to replace with another form when a
> > > Next button is pressed. I want to do this with AJAX. The form should
> > only be
> > > replaced if there are no validation errors.
> > >
> > > Two questions:
> > > - the AjaxSubmitButton.onSubmit method is not being invoked when the
> > button
> > > is clicked. Should I expect it to be?
> > > - assuming that it was invoked, how can can I replace the enclosing form
> > > with a new form?
> > >
> > > Mark
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Partial page rendering with AjaxSubmitButton

2007-05-16 Thread Mark van Leeuwen
> From: [EMAIL PROTECTED] [mailto:wicket-user-
> [EMAIL PROTECTED] On Behalf Of Matej Knopp
> Sent: Wednesday, 16 May 2007 7:17 PM
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user] Partial page rendering with AjaxSubmitButton
> 
> 1. Yes, it should be invoked.

I get the same and other errors with the AJAX "Form Example" on
http://www.wicket-library.com/wicket-examples/ajax.

Without entering Name or Email, clicking the "submit via ajax" button does
not display error messages. However clicking the non-ajax "submit" button
does display errors.

Curiously, when I downloaded the examples (ver 1.2.6) and ran them locally
it works correctly at first. However if I wait a few minutes, then the ajax
submit stops working.

The issue seems to be in the following code from
DefaultRequestTargetResolverStrategy.java:

Session session = Session.get();
PageMap pageMap = session.pageMapForName(requestParameters.getPageMapName(),
false);
if (pageMap == null)
{
// requested pagemap no longer exists - ignore this
// request
processRequest = false;
}

In the above code, the ajax submit fails to do anything when pageMap is
returned as null.


> 
> 2. form.replaceWith(anotherComponent);
> 
> -Matej
> 
> On 5/16/07, Mark van Leeuwen <[EMAIL PROTECTED]> wrote:
> > I have a form on a page which I want to replace with another form when a
> > Next button is pressed. I want to do this with AJAX. The form should
> only be
> > replaced if there are no validation errors.
> >
> > Two questions:
> > - the AjaxSubmitButton.onSubmit method is not being invoked when the
> button
> > is clicked. Should I expect it to be?
> > - assuming that it was invoked, how can can I replace the enclosing form
> > with a new form?
> >
> > Mark


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Partial page rendering with AjaxSubmitButton

2007-05-16 Thread Matej Knopp
1. Yes, it should be invoked.

2. form.replaceWith(anotherComponent);

-Matej

On 5/16/07, Mark van Leeuwen <[EMAIL PROTECTED]> wrote:
> I have a form on a page which I want to replace with another form when a
> Next button is pressed. I want to do this with AJAX. The form should only be
> replaced if there are no validation errors.
>
> Two questions:
> - the AjaxSubmitButton.onSubmit method is not being invoked when the button
> is clicked. Should I expect it to be?
> - assuming that it was invoked, how can can I replace the enclosing form
> with a new form?
>
> Mark
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Partial page rendering with AjaxSubmitButton

2007-05-15 Thread Mark van Leeuwen
I have a form on a page which I want to replace with another form when a
Next button is pressed. I want to do this with AJAX. The form should only be
replaced if there are no validation errors.

Two questions:
- the AjaxSubmitButton.onSubmit method is not being invoked when the button
is clicked. Should I expect it to be?
- assuming that it was invoked, how can can I replace the enclosing form
with a new form?

Mark
 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user