Thank you :)

Yes, the page comes from the same server.

I got the Head to work by including the following.
=============================================================================================
<script type="text/javascript"
src="app/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>

<script type="text/javascript"
src="app/resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>

<script type="text/javascript"
src="app/resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>

<script type="text/javascript"
id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
wicketAjaxDebugEnable=true;
/*-->]^]^>*/</script>
<script>
===============================================================================================

Now wicket Ajax work but we have a problem. All the wicket Ajax urls have
only a query string and so the request goes to Spring MVC controller and not
Wicket.

To simplify the problem I removed Spring MVC out of context, ie created a
new web app with one html page(with a DIV) and one Wicket Page and used Ajax
to load the Wicket page into the DIV(of the HTML page). A smaller app will
also save me a lot of time during build-deploy.

Now I believe I need to do the following to get wicket Ajax to work
1. Somehow prepend the wicket url to the query string passed to Ajax.
   eg:-
onclick="var wcall=wicketAjaxGet('*
?wicket:interface=:2:radioForm:xxxxxx:radioGroup:r1::IBehaviorListener:0:*',null,null,
function() {return Wicket.$('r1a') != null;}.bind(this));"

should become

onclick="var wcall=wicketAjaxGet(*'/myapp/wicket/myPage.html
?wicket:interface=:2:radioForm:xxxxxx:radioGroup:r1::IBehaviorListener:0:*',null,null,
function() {return Wicket.$('r1a') != null;}.bind(this));"

I have no idea of how to change the URL. I will dig deeper and find out if i
can do that. Any advice in the mean time will be of great help.

Thanks,
Avinash P








On Wed, Aug 26, 2009 at 4:35 AM, Michael Mosmann <mich...@mosmann.de> wrote:

> Am Mittwoch, den 26.08.2009, 01:29 -0500 schrieb Avinash palicharla:
> > I have a page built in SpringMVC. I have a iFrame in this page that loads
> a
> > Wicket Page. I want to replace the iFrame with a DIV and load the Wicket
> > page inside the DIV using Ajax.
>
> good luck with this one..
> does this page come from the same server?
>
> > I used Prototype to load the wicket page. The page loads but the wicket
> > javascript does not work anymore. I guess this is because the <head> tag
> > from the wicket response is not processed.
>
> yes...
> 1) you can process the <head>
> 2) you can fake it, if you include wicket-*.js in your page
>
> mm:)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to