Hallo,
I came across strange problem I do not know whether it is mine fault or 
wicket's problem.

On a page, there is a widget, which list news records.
Each record has an edit and delete link. Edit link opens new dialog in jquery's 
thickbox window, which is practically IFrame.

The code for page, which holds form and which is displayed in the thickbox 
window:
http://pastebin.com/m5ca60e78

The code for a link, which shows the thickbox window with a page in it:
http://pastebin.com/m6339b3a

En example usage:
http://pastebin.com/m768350aa
here on line 72 when I do:
target.addComponent(ShopNewsWidgetPanel.this.get("news-container"));

after ajax refresh of the component, which contains news records, each record 
containing edit link, there is 404 error found in the Ajax debug window.
>From firebug console I can find out that if I add a some component (here it is 
>edit link, which is held by news-container), which also contains 
>AbstractDefaultAjaxBehavior, then upon rendering head of the response, there 
>is wrong path to wicket ajax resources:

Correct path:
http://localhost:8080/cz.madewithlove/app/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js

Wrong path after ajax call:
http://localhost:8080/cz.madewithlove/app/shop/rozkovec/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js

The page is mounted like so:
mount(new IndexedHybridUrlCodingStrategy("shop", ShopModulePage.class));

An ajax function, which is called in the page's ajax button onSubmit() method:

function thickbox_window_close(url)
{
   tb_remove(); //removes thickbox window

   // call url of the behavior, this behavior is attached to the link, which 
opens the page in thickbox window
   var wcall=wicketAjaxGet(url, null, null, function() {return true;});

   return !wcall;
}

I could solve it by visiting all components of the parent container except 
behaviors and add them to the ajax request target, but it would be better to 
not bother about it and just add the parent container. Any pointers?


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

Reply via email to