You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ulon (JIRA)" <ji...@apache.org> on 2010/09/15 13:48:32 UTC
[jira] Created: (WICKET-3048) Redirect page in Ajax callback
broken.
Redirect page in Ajax callback broken.
--------------------------------------
Key: WICKET-3048
URL: https://issues.apache.org/jira/browse/WICKET-3048
Project: Wicket
Issue Type: Bug
Affects Versions: 1.5-M2.1, 1.5-M2, 1.5-M1
Reporter: Ulon
Hi.
In Wicket 1.4.x is possible to redirect to a new page during an AJAX request by using Component.setResponsePage(Class).
For instance:
form.add(new AjaxButton("myButton", form) {
@Override
protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
setResponsePage(MockPage.class); //Redirect to another page
}
@Override
protected void onError(final AjaxRequestTarget target, final Form<?> form) {
throw new RuntimeException("Uh oh!");
}
});
However, this seems to be broken in Wicket 1.5.x. The ajax response contains the body of the page to redirect, but Wicket fails to really redirect and instead it prints ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root <ajax-response> element
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (WICKET-3048) Redirect page in Ajax
callback broken.
Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910042#action_12910042 ]
Peter Ertl edited comment on WICKET-3048 at 9/16/10 4:35 AM:
-------------------------------------------------------------
The response header "Ajax-Location" is already handled in wicket-ajax.js. But you are right, the <ajax-response><redirect> is not handled so far.
was (Author: pete):
At least redirecting through response header "Ajax-Location" worked for me. However I could not find the place where <ajax-response><redirect> is handled.
> Redirect page in Ajax callback broken.
> --------------------------------------
>
> Key: WICKET-3048
> URL: https://issues.apache.org/jira/browse/WICKET-3048
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.5-M1, 1.5-M2, 1.5-M2.1
> Reporter: Ulon
> Assignee: Peter Ertl
>
> Hi.
> In Wicket 1.4.x is possible to redirect to a new page during an AJAX request by using Component.setResponsePage(Class).
> For instance:
> form.add(new AjaxButton("myButton", form) {
> @Override
> protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
> setResponsePage(MockPage.class); //Redirect to another page
> }
> @Override
> protected void onError(final AjaxRequestTarget target, final Form<?> form) {
> throw new RuntimeException("Uh oh!");
> }
> });
> However, this seems to be broken in Wicket 1.5.x. The ajax response contains the body of the page to redirect, but Wicket fails to really redirect and instead it prints ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root <ajax-response> element
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3048) Redirect page in Ajax callback
broken.
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910867#action_12910867 ]
Hudson commented on WICKET-3048:
--------------------------------
Integrated in Apache Wicket 1.5.x #334 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/334/])
WICKET-3048 Format the code
No functional change.
WICKET-3048: added missing javascript part
> Redirect page in Ajax callback broken.
> --------------------------------------
>
> Key: WICKET-3048
> URL: https://issues.apache.org/jira/browse/WICKET-3048
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.5-M1, 1.5-M2.1
> Reporter: Ulon
> Assignee: Peter Ertl
> Fix For: 1.5-M3
>
>
> Hi.
> In Wicket 1.4.x is possible to redirect to a new page during an AJAX request by using Component.setResponsePage(Class).
> For instance:
> form.add(new AjaxButton("myButton", form) {
> @Override
> protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
> setResponsePage(MockPage.class); //Redirect to another page
> }
> @Override
> protected void onError(final AjaxRequestTarget target, final Form<?> form) {
> throw new RuntimeException("Uh oh!");
> }
> });
> However, this seems to be broken in Wicket 1.5.x. The ajax response contains the body of the page to redirect, but Wicket fails to really redirect and instead it prints ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root <ajax-response> element
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-3048) Redirect page in Ajax callback
broken.
Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Ertl resolved WICKET-3048.
--------------------------------
Assignee: Peter Ertl
Resolution: Fixed
should be fixed now. Please verify.
> Redirect page in Ajax callback broken.
> --------------------------------------
>
> Key: WICKET-3048
> URL: https://issues.apache.org/jira/browse/WICKET-3048
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.5-M1, 1.5-M2, 1.5-M2.1
> Reporter: Ulon
> Assignee: Peter Ertl
>
> Hi.
> In Wicket 1.4.x is possible to redirect to a new page during an AJAX request by using Component.setResponsePage(Class).
> For instance:
> form.add(new AjaxButton("myButton", form) {
> @Override
> protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
> setResponsePage(MockPage.class); //Redirect to another page
> }
> @Override
> protected void onError(final AjaxRequestTarget target, final Form<?> form) {
> throw new RuntimeException("Uh oh!");
> }
> });
> However, this seems to be broken in Wicket 1.5.x. The ajax response contains the body of the page to redirect, but Wicket fails to really redirect and instead it prints ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root <ajax-response> element
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (WICKET-3048) Redirect page in Ajax callback
broken.
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov reopened WICKET-3048:
-------------------------------------
I don't see the commit for wicket-ajax.js. So I guess it is not fixed yet.
There is a quickstart application in the second reference ticket in my previous comment.
> Redirect page in Ajax callback broken.
> --------------------------------------
>
> Key: WICKET-3048
> URL: https://issues.apache.org/jira/browse/WICKET-3048
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.5-M1, 1.5-M2, 1.5-M2.1
> Reporter: Ulon
> Assignee: Peter Ertl
>
> Hi.
> In Wicket 1.4.x is possible to redirect to a new page during an AJAX request by using Component.setResponsePage(Class).
> For instance:
> form.add(new AjaxButton("myButton", form) {
> @Override
> protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
> setResponsePage(MockPage.class); //Redirect to another page
> }
> @Override
> protected void onError(final AjaxRequestTarget target, final Form<?> form) {
> throw new RuntimeException("Uh oh!");
> }
> });
> However, this seems to be broken in Wicket 1.5.x. The ajax response contains the body of the page to redirect, but Wicket fails to really redirect and instead it prints ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root <ajax-response> element
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3048) Redirect page in Ajax callback
broken.
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909704#action_12909704 ]
Martin Grigorov commented on WICKET-3048:
-----------------------------------------
For reference see https://issues.apache.org/jira/browse/WICKET-2691 and https://issues.apache.org/jira/browse/WICKET-2667.
> Redirect page in Ajax callback broken.
> --------------------------------------
>
> Key: WICKET-3048
> URL: https://issues.apache.org/jira/browse/WICKET-3048
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.5-M1, 1.5-M2, 1.5-M2.1
> Reporter: Ulon
>
> Hi.
> In Wicket 1.4.x is possible to redirect to a new page during an AJAX request by using Component.setResponsePage(Class).
> For instance:
> form.add(new AjaxButton("myButton", form) {
> @Override
> protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
> setResponsePage(MockPage.class); //Redirect to another page
> }
> @Override
> protected void onError(final AjaxRequestTarget target, final Form<?> form) {
> throw new RuntimeException("Uh oh!");
> }
> });
> However, this seems to be broken in Wicket 1.5.x. The ajax response contains the body of the page to redirect, but Wicket fails to really redirect and instead it prints ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root <ajax-response> element
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3048) Redirect page in Ajax callback
broken.
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910106#action_12910106 ]
Hudson commented on WICKET-3048:
--------------------------------
Integrated in Apache Wicket 1.5.x #331 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/331/])
> Redirect page in Ajax callback broken.
> --------------------------------------
>
> Key: WICKET-3048
> URL: https://issues.apache.org/jira/browse/WICKET-3048
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.5-M1, 1.5-M2, 1.5-M2.1
> Reporter: Ulon
> Assignee: Peter Ertl
>
> Hi.
> In Wicket 1.4.x is possible to redirect to a new page during an AJAX request by using Component.setResponsePage(Class).
> For instance:
> form.add(new AjaxButton("myButton", form) {
> @Override
> protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
> setResponsePage(MockPage.class); //Redirect to another page
> }
> @Override
> protected void onError(final AjaxRequestTarget target, final Form<?> form) {
> throw new RuntimeException("Uh oh!");
> }
> });
> However, this seems to be broken in Wicket 1.5.x. The ajax response contains the body of the page to redirect, but Wicket fails to really redirect and instead it prints ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root <ajax-response> element
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3048) Redirect page in Ajax callback
broken.
Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910042#action_12910042 ]
Peter Ertl commented on WICKET-3048:
------------------------------------
At least redirecting through response header "Ajax-Location" worked for me. However I could not find the place where <ajax-response><redirect> is handled.
> Redirect page in Ajax callback broken.
> --------------------------------------
>
> Key: WICKET-3048
> URL: https://issues.apache.org/jira/browse/WICKET-3048
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.5-M1, 1.5-M2, 1.5-M2.1
> Reporter: Ulon
> Assignee: Peter Ertl
>
> Hi.
> In Wicket 1.4.x is possible to redirect to a new page during an AJAX request by using Component.setResponsePage(Class).
> For instance:
> form.add(new AjaxButton("myButton", form) {
> @Override
> protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
> setResponsePage(MockPage.class); //Redirect to another page
> }
> @Override
> protected void onError(final AjaxRequestTarget target, final Form<?> form) {
> throw new RuntimeException("Uh oh!");
> }
> });
> However, this seems to be broken in Wicket 1.5.x. The ajax response contains the body of the page to redirect, but Wicket fails to really redirect and instead it prints ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root <ajax-response> element
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3048) Redirect page in Ajax callback
broken.
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12912238#action_12912238 ]
Hudson commented on WICKET-3048:
--------------------------------
Integrated in Apache Wicket 1.5.x #337 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/337/])
WICKET-3048 Make the constants 'private' again. They are not needed for now from the classes which inherit them
WICKET-3048 Redirect page in Ajax callback broken.
Pass a reference to the WebRequest when creating WebResponse.
1) wicket-examples > Dates were failing with "o.m.jetty.Request: STREAMING" while ServletWebRequest was trying to read the POST parameters via Request's _Reader_
2) Now ServletWebResponse can use the passed WebRequest to check whether this is Ajax request. No code duplication (#isAjax())
> Redirect page in Ajax callback broken.
> --------------------------------------
>
> Key: WICKET-3048
> URL: https://issues.apache.org/jira/browse/WICKET-3048
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.5-M1, 1.5-M2.1
> Reporter: Ulon
> Assignee: Peter Ertl
> Fix For: 1.5-M3
>
>
> Hi.
> In Wicket 1.4.x is possible to redirect to a new page during an AJAX request by using Component.setResponsePage(Class).
> For instance:
> form.add(new AjaxButton("myButton", form) {
> @Override
> protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
> setResponsePage(MockPage.class); //Redirect to another page
> }
> @Override
> protected void onError(final AjaxRequestTarget target, final Form<?> form) {
> throw new RuntimeException("Uh oh!");
> }
> });
> However, this seems to be broken in Wicket 1.5.x. The ajax response contains the body of the page to redirect, but Wicket fails to really redirect and instead it prints ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root <ajax-response> element
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-3048) Redirect page in Ajax callback
broken.
Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Ertl resolved WICKET-3048.
--------------------------------
Fix Version/s: 1.5-M3
Resolution: Fixed
fixed wicket-ajax.js
> Redirect page in Ajax callback broken.
> --------------------------------------
>
> Key: WICKET-3048
> URL: https://issues.apache.org/jira/browse/WICKET-3048
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.5-M1, 1.5-M2, 1.5-M2.1
> Reporter: Ulon
> Assignee: Peter Ertl
> Fix For: 1.5-M3
>
>
> Hi.
> In Wicket 1.4.x is possible to redirect to a new page during an AJAX request by using Component.setResponsePage(Class).
> For instance:
> form.add(new AjaxButton("myButton", form) {
> @Override
> protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
> setResponsePage(MockPage.class); //Redirect to another page
> }
> @Override
> protected void onError(final AjaxRequestTarget target, final Form<?> form) {
> throw new RuntimeException("Uh oh!");
> }
> });
> However, this seems to be broken in Wicket 1.5.x. The ajax response contains the body of the page to redirect, but Wicket fails to really redirect and instead it prints ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root <ajax-response> element
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.