wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Goupil <goupilpie...@gmail.com>
Subject AjaxRequestTarget weirdness
Date Thu, 08 May 2014 15:07:46 GMT
Hello folks,

Sorry if this is double-posting, but I have the feeling that my previous
message didn't find its way.

I'm currently trying to roll my own on Wicket-Atmosphere: I've forked the
github repo and I'm trying to make the project unit testable.

I must admit that I'm not far from reaching my objectives, but there is a
thing that puzzles me.

Please, let me explain: I would like to have an AJAX-style response when JS
and / or components are added to the event bus, since it uses
AjaxRequestTarget. That would allow me to assert whatever I like using the
WicketTester API.

Here is a sample code:

if (this.application.createRequestCycle(request,
            this.broadcaster.broadcast(response.toString(), _resource);

Here, the System.out displays something correct like that:

<?xml version="1.0" encoding="UTF-8"?>
     <component id="id1" >
         <![CDATA[<div id="id1">my label</div>]]>
          <![CDATA[(function(){ myJs; })();]]>

BUT, when I then do this in my unit-test:

I only get:
<?xml version="1.0" encoding="UTF-8"?><ajax-response></ajax-response>

A clue, anyone, please?

If needed, I can publish the link to my github project. But I prefer asking
here first because it needs some cleaning and maybe the problem I'm facing
is just dumb.

Best regards,


La vie est source de joie, la mort est source de paix, seule la transition
est difficile.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message