wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shimin_q <smq...@hotmail.com>
Subject Re: AJAX not working after migrating from wicket 1.5.5 to 6.3.0
Date Mon, 26 Nov 2012 18:40:54 GMT
After a lot of tries, here is what I obeserved so far in my envionment. 
Basically, it appears how the page with AJAX is loaded affects whether AJAX
listeners are enabled on the page.  Could anyone please take a look at below
and let me know why this is the case and what I need to do to fix it? 
Thanks a lot!!

I turned on the web console in my Firefox browser and watched the logging
messages.   

The page with AJAX is "http://127.0.0.1:7999/newmetaprofile".  The page that
contains a link to the "newmetaprofile" page is
"http://127.0.0.1:7999/8770main".  When the "newmetaprofile" page is loaded
by clicking on the newmetaprofile link on the "8770main" page, AJAX does not
work.  Here is the log (after the transition from the "8770main" page to the
"newmetaprofile" page, nothing happens)

[13:16:44.637] GET http://127.0.0.1:7999/8770main [HTTP/1.1 200 OK 342ms]
[13:16:54.010] GET http://127.0.0.1:7999/newmetaprofile [HTTP/1.1 302 Found
2766ms]
[13:16:56.886] GET http://127.0.0.1:7999/newmetaprofile?13 [HTTP/1.1 200 OK
37ms]

But if I type "http://127.0.0.1:7999/newmetaprofile" in the address bar to
load the page manually or if I refresh/reload the
"http://127.0.0.1:7999/newmetaprofile" page, a whole bunch of things happen
including the ajax scripts being called:

--
[13:18:54.754] GET http://127.0.0.1:7999/newmetaprofile [HTTP/1.1 302 Found
2761ms]
[13:18:57.494] GET http://127.0.0.1:7999/newmetaprofile?14 [HTTP/1.1 200 OK
79ms]
[13:18:57.621] GET
http://127.0.0.1:7999/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-ver-1353527137996.js
[HTTP/1.1 304 Not Modified 300ms]
[13:18:57.622] GET
http://127.0.0.1:7999/wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1353527137996.js
[HTTP/1.1 304 Not Modified 276ms]
[13:18:57.622] GET
http://127.0.0.1:7999/wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-ver-1353527137996.js
[HTTP/1.1 304 Not Modified 290ms]
[13:18:57.623] GET
http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css [HTTP/1.1
304 Not Modified 165ms]
[13:18:57.623] GET http://code.jquery.com/jquery-1.8.3.min.js [HTTP/1.1 304
Not Modified 186ms]
[13:18:57.624] GET
http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js [HTTP/1.1 304
Not Modified 154ms]
...

Subsequently, AJAX behaves as expected, it resets fields when a metaprofile
type is selected.  I diff'd the newmetaprofile page source for the above two
scenarios.  Everything is the same, EXCEPT one difference in the generated
baseUrl:

Wicket.Ajax.baseUrl="newmetaprofile";  vs.
Wicket.Ajax.baseUrl="newmetaprofile?13";

For your reference, the entire header is attached below:::


<html xmlns:wicket="http://wicket.apache.org/">
<head>




<title wicket:id="pageTitle">Create Metaprofile</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,
maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet"
href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />  
      
            


</head>
<body>
<div id="container">
    <div id="header">
        
Create Metaprofile

    </div>
<form id="createMPForm" wicket:id="createMPForm" method="post"
action="./newmetaprofile?11-1.IFormSubmitListener-createMPForm"><div
style="width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hidden"><input
type="hidden" name="createMPForm_hf_0" id="createMPForm_hf_0" /></div>
<div id="content">
<div id="metaprofile">
        

          
	     
 
              	 <images/asterisk.gif> <label for="profileType"
wicket:id="profileTypeLabel" class="requiredLabel">Metaprofile Type</label>
              	 <select id="profileType" name="type" wicket:id="type">
<option selected="selected" value="">Choose One</option>
<option value="OXE">OXE</option>
<option value="OXE_WITH_OT">OXE_WITH_OT</option>
<option value="OXE_WITH_ICS">OXE_WITH_ICS</option>
<option value="OT">OT</option>
</select> 
            
...




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AJAX-not-working-after-migrating-from-wicket-1-5-5-to-6-3-0-tp4654065p4654234.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


Mime
View raw message