wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Soloschenko <tobiassolosche...@googlemail.com>
Subject Re: setResponsePage with AjaxButton not working correctly
Date Tue, 23 Dec 2014 08:02:02 GMT
Hi,

I also had troubles to set the response page within an ajax callback in the portlet apps.
The workaround for me was not to switch the whole page, but to wrap the content into one panel
and switch this. I think it might has something to do with the markup of the portlet container,
because it is not valid xml, but I don't know this for sure.

kind regards

Tobias

> Am 23.12.2014 um 08:32 schrieb Martin Grigorov <mgrigorov@apache.org>:
> 
> Hi,
> 
> I guess it is a problem with wicketstuff-portlet library.
> Hopefully someone more experienced with Portlets will help you!
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
>> On Tue, Dec 23, 2014 at 9:17 AM, Milind <m.gawade@maxxton.com> wrote:
>> 
>> Hello all,
>> 
>> Currently i am using wicket 6.18 with liferay-portal-6.2-ce-ga2,
>> 
>> Below is code written in TestPage.java
>> 
>> AjaxButton testButton = new AjaxButton("testButton", form)
>>    {
>>      private static final long serialVersionUID = 1L;
>> 
>>      @Override
>>      protected void onSubmit(AjaxRequestTarget target,  Form<?> form)
>>      {
>>         setResponsePage(SecondPage.class, pageParams)
>>      }
>>    }
>> 
>> When testButton is added inside <form> then only it calls the onSubmit()
>> method else not.
>> 
>> and after adding it to <form> tag, its not working for setResponsePage()
>> call, and shows below error inside Ajax-debug-window.
>> 
>> ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Error:
>> Invalid XML: <!DOCTYPE html> <html class="aui ltr" dir="ltr" lang="en-US">
>> <head> <title>Home - Test</title> <meta content="initial-scale=1.0,
>> width=device-width" name="viewport" /> <meta content="text/html;
>> charset=UTF-8" http-equiv="content-type" /> <link
>> href="http://localhost:8150/test-theme/images/favicon.ico" rel="Shortcut
>> Icon" />...
>> 
>> 
>> 
>> 
>> Please revert if anyone knows this issue.
>> 
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/setResponsePage-with-AjaxButton-not-working-correctly-tp4668881.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
>> 
>> 

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


Mime
View raw message