Hi there,
Reading previous posts i have discovered the existence of the yui
context menu in wicket stuff that now i'm using in a project.
More specifically, i'm using wicket 1.3.4 with wicket-yui-core 1.3.0
from the wicket 1.3.0 branch of wicketstuff.
I would like to do a non-ajax click in my context menu because i need to
generate a pdf report and propose to the user the classic download
window of the browser. Using ajax, the pdf is generated but the ajax
response is empty and the user doesn't see anything.
This is my actual code in the MenuItem.onClick(AjaxRequestTarget, targetId):
IResourceStream stream = new ByteArrayResource("application/pdf",
s.toByteArray()).getResourceStream();
RequestCycle.get().setRequestTarget(new
ResourceStreamRequestTarget(stream));
With these lines if i do a "normal" submit the user could see the
download window with the pdf generated. Using an ajax-click it doesn't work.
The YuiContextMenuBehaviour in the respond method calls the
YuiContextMenu.onClick(AjaxRequestTarget, targetId). But in the
YuiContextMenu there is a method "onClick()" which seems not called by
anyone.
For me, it seems that the "onClick()" could resolve my issue (it doesn't
use ajax) but i don't know why it is not called by anyone. Is it
deprecated ?
Thanks,
Emanuele
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]