I've added a new test, TestDragAndDrop.java, to the htmlunit-richfaces project. To run the test:
svn co http://anonsvn.jboss.org/repos/jsfunit/htmlunit-richfaces/
cd htmlunit-richfaces
mvn -Dtest=DragAndDropTest
I'm doing the same thing Marc showed in his blog here:
http://mguillem.wordpress.com/2007/08/02/scriptaculous-drag-drop-now-works-for-htmlunit/
But nothing seems to happen when I do this with RichFaces.
@Marc: I seem to remember that you were looking into this with help from the tracing debugger. Are you still looking into it? Should I assign it to you? Or is it open for others to work on?
@Daniel:
I've already spent a few hours on this but without success (until now). I don't currently work on it, so you can take if you want.
If I throw a big fat Thread.sleep(100000) inside of testDragAndDrop(), run the test, and load the test page in Firefox, dragging the "Flexible Ajax" box to the "PHP Frameworks" container results in a 404 error, apparently due to the ";jsessionid=XXX" being appended to the URL. Could this be the source of the problem? Are you seeing this as well?
Never mind, I upgraded to the latest cargo snapshot and the 404s went away.
However, I do have a request: Can you attach non-minified versions of framework.pack.js and ui.pack.js (3.2.2.GA). This would make it much easier for me to narrow the problem down.
Thanks!
I think that the packed versions are a conglomeration of several smaller files. You can download the source bundle from here:
http://www.jboss.org/jbossrichfaces/downloads/
@Daniel: if you want you can use Rhino to produce non-minified versions of the scripts using Context.compile(..) and then Context.decompile(..)
akquinet tech@spree GmbH has asked me to investigate and fix this issue. It was not a simple job but the result is... that there is no bug in HtmlUnit! Only two additional events should be triggered in the test code to make it green.
(at least this is the case with HtmlUnit-2.7 or newer, no idea how it was at the time where this bug has been reported)
As a consequence I close this issue as invalid.
Here is the working version of the unit test:
public void testDragAndDrop() throws Exception
{
WebClient webClient = new WebClient(BrowserVersion.getDefault());
webClient.setAjaxController(new NicelyResynchronizingAjaxController());
String url = "http://localhost:8080/htmlunit-richfaces/richfaces/dragSupport.jsf";
HtmlPage page = (HtmlPage)webClient.getPage(url);
page = (HtmlPage)webClient.getPage(url); // get it a second time: the server needs to know that
// we accept cookies and it should not generate urls that it won't accept later because they contain
// the session id (like "/htmlunit-richfaces/richfaces/dragSupport.jsf;jsessionid=16x7tguh72gi6")
}