You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Patrick Davids <pa...@nuboit.de> on 2013/06/07 12:38:39 UTC

setResponsePage does not work / on (own) ajax requests

Hi all,
I implemented a panel having its own AbstractAjaxBehavior.

I provided the callback url to my pagepanel, the ajax request works; 
everything seems fine.

Than I implemented an abstract method onSelect() to my panel to let an 
implementation do some custom thinks (the onRequest() of my internal 
behavior just delegates to abstract onSelect() of my panel)

My first test... simply doing a:

add(new MyPanel("foo"){
   public void onSelect(){
     setResponsePage(some where)
   }
)

but nothing happens...

Using AbstractAjaxDefaultBehavior overriding respond() and delegating to 
onSelect() does not work, too.

Do I have to do something special, to behave like an e.g. AjaxLink?!?
setResponsePage() is working there...

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


Solved / Re: setResponsePage does not work / on (own) ajax requests

Posted by Patrick Davids <pa...@nuboit.de>.
Whem I'm using Wicket.Ajax.get(...) to execute my AjaxCall via 
JavaScript it works.

Previously I used pure jquery $.ajax(...) and that does not work.

kind regards
Patrick

Am 07.06.2013 14:02, schrieb Patrick Davids:
> Runs into WicketRuntimeExceptions (but they are catched).
>
> e.g.
> org.apache.wicket.WicketRuntimeException: Error attaching this container
> for rendering: [Menu [Component id = offices]]
>
> Patrick
>
> Am 07.06.2013 13:33, schrieb Sven Meier:
>> Put a break point on RequestCycle#execute() and debug what's happening
>> when you're Javascript is firing.
>>
>> Sven
>>
>> On 06/07/2013 01:27 PM, Patrick Davids wrote:
>>> Hmm... "select", but is fired via jquery on client side, and I do the
>>> ajax request by $.ajax(){ url: 'bevahior generated callback url' } on my
>>> own.
>>>
>>> (Im working with jquerys autocomplete.)
>>>
>>> Patrick
>>>
>>>
>>>
>>> Am 07.06.2013 12:48, schrieb Sven Meier:
>>>> On what JavaScript event is your behavior listening?
>>>>
>>>> Sven
>>>>
>>>> On 06/07/2013 12:38 PM, Patrick Davids wrote:
>>>>> Hi all,
>>>>> I implemented a panel having its own AbstractAjaxBehavior.
>>>>>
>>>>> I provided the callback url to my pagepanel, the ajax request works;
>>>>> everything seems fine.
>>>>>
>>>>> Than I implemented an abstract method onSelect() to my panel to let an
>>>>> implementation do some custom thinks (the onRequest() of my internal
>>>>> behavior just delegates to abstract onSelect() of my panel)
>>>>>
>>>>> My first test... simply doing a:
>>>>>
>>>>> add(new MyPanel("foo"){
>>>>>       public void onSelect(){
>>>>>         setResponsePage(some where)
>>>>>       }
>>>>> )
>>>>>
>>>>> but nothing happens...
>>>>>
>>>>> Using AbstractAjaxDefaultBehavior overriding respond() and
>>>>> delegating to
>>>>> onSelect() does not work, too.
>>>>>
>>>>> Do I have to do something special, to behave like an e.g. AjaxLink?!?
>>>>> setResponsePage() is working there...
>>>>>
>>>>> kind regards
>>>>> Patrick
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>

-- 
Mit freundlichen Grüßen,

Patrick Davids

NuboIT GmbH & Co. KG
Kieler Str. 103-107 • 25474 Bönningstedt

Email: patrick.davids@nuboit.de

Handelsregister: HRA6819 Pi  | Amtsgericht Pinneberg

Geschäftsführung der Verwaltungsgesellschaft
Daniel Fraga Zander

HRB10145Pi | Amtsgericht Pinneberg

Re: setResponsePage does not work / on (own) ajax requests

Posted by Patrick Davids <pa...@nuboit.de>.
Runs into WicketRuntimeExceptions (but they are catched).

e.g.
org.apache.wicket.WicketRuntimeException: Error attaching this container 
for rendering: [Menu [Component id = offices]]

Patrick

Am 07.06.2013 13:33, schrieb Sven Meier:
> Put a break point on RequestCycle#execute() and debug what's happening
> when you're Javascript is firing.
>
> Sven
>
> On 06/07/2013 01:27 PM, Patrick Davids wrote:
>> Hmm... "select", but is fired via jquery on client side, and I do the
>> ajax request by $.ajax(){ url: 'bevahior generated callback url' } on my
>> own.
>>
>> (Im working with jquerys autocomplete.)
>>
>> Patrick
>>
>>
>>
>> Am 07.06.2013 12:48, schrieb Sven Meier:
>>> On what JavaScript event is your behavior listening?
>>>
>>> Sven
>>>
>>> On 06/07/2013 12:38 PM, Patrick Davids wrote:
>>>> Hi all,
>>>> I implemented a panel having its own AbstractAjaxBehavior.
>>>>
>>>> I provided the callback url to my pagepanel, the ajax request works;
>>>> everything seems fine.
>>>>
>>>> Than I implemented an abstract method onSelect() to my panel to let an
>>>> implementation do some custom thinks (the onRequest() of my internal
>>>> behavior just delegates to abstract onSelect() of my panel)
>>>>
>>>> My first test... simply doing a:
>>>>
>>>> add(new MyPanel("foo"){
>>>>      public void onSelect(){
>>>>        setResponsePage(some where)
>>>>      }
>>>> )
>>>>
>>>> but nothing happens...
>>>>
>>>> Using AbstractAjaxDefaultBehavior overriding respond() and
>>>> delegating to
>>>> onSelect() does not work, too.
>>>>
>>>> Do I have to do something special, to behave like an e.g. AjaxLink?!?
>>>> setResponsePage() is working there...
>>>>
>>>> kind regards
>>>> Patrick
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

-- 
Mit freundlichen Grüßen,

Patrick Davids

NuboIT GmbH & Co. KG
Kieler Str. 103-107 • 25474 Bönningstedt

Email: patrick.davids@nuboit.de

Handelsregister: HRA6819 Pi  | Amtsgericht Pinneberg

Geschäftsführung der Verwaltungsgesellschaft
Daniel Fraga Zander

HRB10145Pi | Amtsgericht Pinneberg

Re: setResponsePage does not work / on (own) ajax requests

Posted by Sven Meier <sv...@meiers.net>.
Put a break point on RequestCycle#execute() and debug what's happening 
when you're Javascript is firing.

Sven

On 06/07/2013 01:27 PM, Patrick Davids wrote:
> Hmm... "select", but is fired via jquery on client side, and I do the
> ajax request by $.ajax(){ url: 'bevahior generated callback url' } on my
> own.
>
> (Im working with jquerys autocomplete.)
>
> Patrick
>
>
>
> Am 07.06.2013 12:48, schrieb Sven Meier:
>> On what JavaScript event is your behavior listening?
>>
>> Sven
>>
>> On 06/07/2013 12:38 PM, Patrick Davids wrote:
>>> Hi all,
>>> I implemented a panel having its own AbstractAjaxBehavior.
>>>
>>> I provided the callback url to my pagepanel, the ajax request works;
>>> everything seems fine.
>>>
>>> Than I implemented an abstract method onSelect() to my panel to let an
>>> implementation do some custom thinks (the onRequest() of my internal
>>> behavior just delegates to abstract onSelect() of my panel)
>>>
>>> My first test... simply doing a:
>>>
>>> add(new MyPanel("foo"){
>>>      public void onSelect(){
>>>        setResponsePage(some where)
>>>      }
>>> )
>>>
>>> but nothing happens...
>>>
>>> Using AbstractAjaxDefaultBehavior overriding respond() and delegating to
>>> onSelect() does not work, too.
>>>
>>> Do I have to do something special, to behave like an e.g. AjaxLink?!?
>>> setResponsePage() is working there...
>>>
>>> kind regards
>>> Patrick
>>> ---------------------------------------------------------------------
>>> 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
>>


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


Re: setResponsePage does not work / on (own) ajax requests

Posted by Patrick Davids <pa...@nuboit.de>.
Hmm... "select", but is fired via jquery on client side, and I do the 
ajax request by $.ajax(){ url: 'bevahior generated callback url' } on my 
own.

(Im working with jquerys autocomplete.)

Patrick



Am 07.06.2013 12:48, schrieb Sven Meier:
> On what JavaScript event is your behavior listening?
>
> Sven
>
> On 06/07/2013 12:38 PM, Patrick Davids wrote:
>> Hi all,
>> I implemented a panel having its own AbstractAjaxBehavior.
>>
>> I provided the callback url to my pagepanel, the ajax request works;
>> everything seems fine.
>>
>> Than I implemented an abstract method onSelect() to my panel to let an
>> implementation do some custom thinks (the onRequest() of my internal
>> behavior just delegates to abstract onSelect() of my panel)
>>
>> My first test... simply doing a:
>>
>> add(new MyPanel("foo"){
>>     public void onSelect(){
>>       setResponsePage(some where)
>>     }
>> )
>>
>> but nothing happens...
>>
>> Using AbstractAjaxDefaultBehavior overriding respond() and delegating to
>> onSelect() does not work, too.
>>
>> Do I have to do something special, to behave like an e.g. AjaxLink?!?
>> setResponsePage() is working there...
>>
>> kind regards
>> Patrick
>> ---------------------------------------------------------------------
>> 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
>

-- 
Mit freundlichen Grüßen,

Patrick Davids

NuboIT GmbH & Co. KG
Kieler Str. 103-107 • 25474 Bönningstedt

Email: patrick.davids@nuboit.de

Handelsregister: HRA6819 Pi  | Amtsgericht Pinneberg

Geschäftsführung der Verwaltungsgesellschaft
Daniel Fraga Zander

HRB10145Pi | Amtsgericht Pinneberg

Re: setResponsePage does not work / on (own) ajax requests

Posted by Sven Meier <sv...@meiers.net>.
On what JavaScript event is your behavior listening?

Sven

On 06/07/2013 12:38 PM, Patrick Davids wrote:
> Hi all,
> I implemented a panel having its own AbstractAjaxBehavior.
>
> I provided the callback url to my pagepanel, the ajax request works;
> everything seems fine.
>
> Than I implemented an abstract method onSelect() to my panel to let an
> implementation do some custom thinks (the onRequest() of my internal
> behavior just delegates to abstract onSelect() of my panel)
>
> My first test... simply doing a:
>
> add(new MyPanel("foo"){
>     public void onSelect(){
>       setResponsePage(some where)
>     }
> )
>
> but nothing happens...
>
> Using AbstractAjaxDefaultBehavior overriding respond() and delegating to
> onSelect() does not work, too.
>
> Do I have to do something special, to behave like an e.g. AjaxLink?!?
> setResponsePage() is working there...
>
> kind regards
> Patrick
> ---------------------------------------------------------------------
> 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