It's O.K., and you were correct. The wicket-ajax.js file have been cached, because clearing the cache got things working again with the SNAPSHOT.
Thanks, David -----Original Message----- From: Igor Vaynberg [mailto:[email protected]] Sent: Sunday, November 06, 2011 9:21 PM To: [email protected] Subject: Re: wicket-4200 still broken in 1.5-SNAPSHOT maybe your browser has cached wicket-ajax.js? try clearing the browser cache. otherwise check if your browser sees the below lines in wicket-ajax.js which execute the prepending javascript: // go through the ajax response and execute all priority-invocations first for (var i = 0; i < root.childNodes.length; ++i) { var node = root.childNodes[i]; if (node.tagName == "priority-evaluate") { this.processEvaluation(steps, node); } } // go through the ajax response and for every action (component, js evaluation, header contribution) if the above is in your ajax js and it still doesnt work attach a quickstart to the jira ticket that reproduces your particular problem. -igor On Sun, Nov 6, 2011 at 6:41 PM, David Berkman <[email protected]> wrote: > I understand that wicket-4200 (no prepended javascript in > onBeforeRender()) is marked fixed in 1.5.3. I pulled the latest > SNAPSHOT to see if I could get an early fix. It may be that the > current snapshot is known to be unstable in this regard, but > prepending javascript still does not work. I've been told it does, but > it really does not and you may want to check this out. I added these lines to > an ajax target... > > > > StringBuilder prependBuilder; > > StringBuilder appendBuilder; > > > > prependBuilder = new StringBuilder("var outerDijit = > dijit.byId('").append(dojoComponent.getMarkupId()).append("');") > > .append("if (outerDijit) > {outerDijit.destroyDescendants();outerDijit.destroyRecursive();") > > > .append("dojo.byId('").append(dojoComponent.getDijitContainerMarkupId( > )) > .append("').id='").append(dojoComponent.getMarkupId()).append("'}"); > > > > appendBuilder = new > StringBuilder("dojo.parser.parse(dojo.byId('").append(dojoComponent.ge > tD ijitContainerMarkupId()).append("'));"); > > > > target.prependJavaScript("alert('boofaz');"); > > target.prependJavaScript(prependBuilder); > > target.appendJavaScript(appendBuilder); > > > > Really, most of this code does not matter. Just note that the first > bit of javascript is the simple alert('boofaz') (why 'boofaz', why not?). > The resulting return has this as the first priority-evaluate... > > > > <priority-evaluate><![CDATA[alert('boofaz');]]></priority-evaluate> > > > > ...but no alert is ever produced. However, it's clear from the results > of the ajax return that the regular evaluate sections are run. So > something is wrong with the latest wicket-ajax.js. > > > > David > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
