Re: Ajax response not completed

2008-12-16 Thread Emanuele Gesuato

Nino Saturnino Martinez Vazquez Wael wrote:
Beats me, seems like somethings wrong,maybe a bug..? I'd create a 
quickstart (really easy with maven,  
http://wicket.apache.org/quickstart.html ) and attach it to a jira issue..


If the code are somewhat working, and the only annoying thing are the 
mouse icon you could try to set the mouse icon manually..




Is it normal that the ajax response never get completed ? It remains in 
the Invoking pre-call handler(s); this is why the mouse remains in 
waiting state.


However, i've tried wicket 1.3.5 and problem remains.

I'm not very skilled with javascript but it seems that wicket has its 
own function to change the mouse pointer. How could i call them ? using 
AjaxRequestTarget.appendJavascript() ?


Thanks,
Emanuele




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax response not completed

2008-12-15 Thread Emanuele Gesuato

Emanuele Gesuato wrote:

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Here the code of the html and java part:

**html**
?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
titleJStore/title
/head
body

a href=# wicket:id=mylinkClick me/a

/body
/html





*** java ***
add(new AjaxFallbackLink(link){
@Override
public void onClick(AjaxRequestTarget target) {
PageParameters params = new PageParameters();
params.add(file, /home/eg/test.pdf);
params.add(type, application/pdf);

setResponsePage(FakePageForAjaxPrint.class, params);

}   
});


The other source code are available in the previous email.

I forgot to mention that i don't have any error on my browser (Firefox 
3.0.4). Javascript works fine but the mouse pointer still kepy busy.


I've just tried with firefox 2.0.0.18 but i've got the same problem.

The page i'm accessing is a bookmarkable page: could it be related ?



Thanks for any help,
Emanuele






-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax response not completed

2008-12-15 Thread Nino Saturnino Martinez Vazquez Wael
Beats me, seems like somethings wrong,maybe a bug..? I'd create a 
quickstart (really easy with maven,  
http://wicket.apache.org/quickstart.html ) and attach it to a jira issue..


If the code are somewhat working, and the only annoying thing are the 
mouse icon you could try to set the mouse icon manually..


Emanuele Gesuato wrote:

Emanuele Gesuato wrote:

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Here the code of the html and java part:

**html**
?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
titleJStore/title
/head
body

a href=# wicket:id=mylinkClick me/a

/body
/html





*** java ***
add(new AjaxFallbackLink(link){
@Override
public void onClick(AjaxRequestTarget target) {
PageParameters params = new PageParameters();
params.add(file, /home/eg/test.pdf);
params.add(type, application/pdf);

setResponsePage(FakePageForAjaxPrint.class, params);

}   
});



The other source code are available in the previous email.

I forgot to mention that i don't have any error on my browser (Firefox 
3.0.4). Javascript works fine but the mouse pointer still kepy busy.


I've just tried with firefox 2.0.0.18 but i've got the same problem.

The page i'm accessing is a bookmarkable page: could it be related ?



Thanks for any help,
Emanuele






-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Ajax response not completed

2008-12-12 Thread Emanuele Gesuato

Hi there,

I'm sorry for sending two email the same day, but i've got a problem 
that is very strange for me. I'm using wicket 1.3.4 with the patch 
WICKET-1838 provided by Matej Knopp and i'm testing the page on firefox 
3.0.4.


When i click on an ajax link that generates a pdf, the file correctly 
shows to the user but the mouse is in waiting state and in the ajax 
debug window i've got ajax blocked in invoking pre-call handler.

Here the log:

INFO: Using XMLHttpRequest transport
INFO:
INFO: Initiating Ajax GET request on 
?wicket:interface=:3:table::IActivePageBehaviorListener:3:amp;wicket:ignoreIfNotActive=trueaction=StampatargetId=tablecontextMenuId=menurandom=0.7506497972643358

INFO: Invoking pre-call handler(s)...


When i click on the ajax link the following code is executed:
...

PageParameters params = new PageParameters();
params.add(file, /home/eg/test.pdf);
setResponsePage(FakePageForAjaxPrint.class, params);
...


The FakePageForAjaxPrint is an empty page mounted on a specific 
QueryStringUrlCodingStrategy that in the decode method does the following:



public IRequestTarget decode(RequestParameters requestParameters) {
	String filename = ((String[]) 
requestParameters.getParameters().get(file))[0];


final File file = new File(filename);
IResourceStream resourceStream = new FileResourceStream(file);

	ResourceStreamRequestTarget rsrt = new 
ResourceStreamRequestTarget(resourceStream) {

@Override
public String getFileName() {
return file.getName();
}
};
try {
resourceStream.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return rsrt;
}


So, when the link is clicked the pdf is showed in the download window of 
the browser, but the ajax is blocked in Invoking pre-call 
handler(s)... and the mouse pointer is in loading state.
I can click as many times i want in the ajax link and the pdf is always 
showed to the user.


How can i complete the ajax response ?


Sorry for the long email,
Thanks,
Emanuele



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org