AjaxRequestTarget weirdness
Hello folks, 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, response).processRequestAndDetach()) { System.out.println(response.toString()); this.broadcaster.broadcast(response.toString(), _resource); } -- Here, the System.out displays something correct like that: -- -- BUT, when I then do this in my unit-test: tester.getLastResponse().getDocument(); I only get: -- -- 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, Pierre -- La vie est source de joie, la mort est source de paix, seule la transition est difficile.
AjaxRequestTarget weirdness
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, response).processRequestAndDetach()) { System.out.println(response.toString()); this.broadcaster.broadcast(response.toString(), _resource); } -- Here, the System.out displays something correct like that: -- -- BUT, when I then do this in my unit-test: tester.getLastResponse().getDocument(); I only get: -- -- 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, Pierre -- La vie est source de joie, la mort est source de paix, seule la transition est difficile.
AjaxRequestTarget weirdness
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 from EventBus.java in Wicket-Atmosphere: -- if (this.application.createRequestCycle(request, response).processRequestAndDetach()) { System.out.println(response.toString()); this.broadcaster.broadcast(response.toString(), _resource); } -- Here, the System.out displays something correct like that: -- -- But, when I then do this in my unit-test: tester.getLastResponse().getDocument(); I only get: -- -- 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, Pierre -- La vie est source de joie, la mort est source de paix, seule la transition est difficile.