ResourceResponse processing Accept-Ranges

2013-06-07 Thread Maxim Solodovnik
Hello All, Is it possible to create ResourceResponse in wicket able to work with ranges request for resource? i.e. initially set Accept-Ranges: bytes header parse Range: bytes=0-1 request header add correct Content-Range: bytes 0-1/232469 and Content-Length: 2 headers based on request Thanks in

Re: ResourceResponse processing Accept-Ranges

2013-06-07 Thread Sven Meier
Hi, your dynamic resource can parse a Range header from the request and send back a Content-Range header along the requested content. This should work as with any servlet too. Let us know how you solved this. Regards Sven -- View this message in context:

Re: Custom markup cache key in hierarchy

2013-06-07 Thread Sven Meier
Hi, I think your usage should work. Can you create a quickstart and attach it to a Jira issue? Sven On 06/05/2013 09:27 PM, Bas Gooren wrote: Hi *, We've built a platform which hosts dynamic websites. Websites can be added/updated/removed on demand, and all run on a single wicket

Re: ResourceResponse processing Accept-Ranges

2013-06-07 Thread Maxim Solodovnik
Hello Sven, Thanks for the response I was able to implement this: https://svn.apache.org/repos/asf/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/util/RecordingResourceReference.java The only issue remains: the following stacktraces while client drops the current connection and

setResponsePage does not work / on (own) ajax requests

2013-06-07 Thread Patrick Davids
Hi all, I implemented a panel having its own AbstractAjaxBehavior. I provided the callback url to my pagepanel, the ajax request works; everything seems fine. Than I implemented an abstract method onSelect() to my panel to let an implementation do some custom thinks (the onRequest() of my

Re: ResourceResponse processing Accept-Ranges

2013-06-07 Thread Sven Meier
Hi, IMHO is would be easier to just extend AbstractResource and catch ClientAbortException in a custom WriteCallback. See 13.6 Custom resources in the excellent Wicket free guide [1]. Hope this helps Sven [1] http://code.google.com/p/wicket-guide On 06/07/2013 12:30 PM, Maxim Solodovnik

Re: ResourceResponse processing Accept-Ranges

2013-06-07 Thread Maxim Solodovnik
Thanks! will try it On Fri, Jun 7, 2013 at 5:46 PM, Sven Meier s...@meiers.net wrote: Hi, IMHO is would be easier to just extend AbstractResource and catch ClientAbortException in a custom WriteCallback. See 13.6 Custom resources in the excellent Wicket free guide [1]. Hope this helps

Re: setResponsePage does not work / on (own) ajax requests

2013-06-07 Thread Sven Meier
On what JavaScript event is your behavior listening? Sven On 06/07/2013 12:38 PM, Patrick Davids wrote: Hi all, I implemented a panel having its own AbstractAjaxBehavior. I provided the callback url to my pagepanel, the ajax request works; everything seems fine. Than I implemented an

Re: setResponsePage does not work / on (own) ajax requests

2013-06-07 Thread Patrick Davids
Hmm... select, but is fired via jquery on client side, and I do the ajax request by $.ajax(){ url: 'bevahior generated callback url' } on my own. (Im working with jquerys autocomplete.) Patrick Am 07.06.2013 12:48, schrieb Sven Meier: On what JavaScript event is your behavior listening?

Re: UrlResourceReference for images

2013-06-07 Thread bronius
Relative is not good because resources are served from different application, just currently both applications are deployed on same tomcat so they have urls http://localhost:8080/app1 and http://localhost:8080/app2. When smart wicket renders image src i get something like this:

Re: setResponsePage does not work / on (own) ajax requests

2013-06-07 Thread Sven Meier
Put a break point on RequestCycle#execute() and debug what's happening when you're Javascript is firing. Sven On 06/07/2013 01:27 PM, Patrick Davids wrote: Hmm... select, but is fired via jquery on client side, and I do the ajax request by $.ajax(){ url: 'bevahior generated callback url' } on

Re: setResponsePage does not work / on (own) ajax requests

2013-06-07 Thread Patrick Davids
Runs into WicketRuntimeExceptions (but they are catched). e.g. org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [Menu [Component id = offices]] Patrick Am 07.06.2013 13:33, schrieb Sven Meier: Put a break point on RequestCycle#execute() and debug what's

Solved / Re: setResponsePage does not work / on (own) ajax requests

2013-06-07 Thread Patrick Davids
Whem I'm using Wicket.Ajax.get(...) to execute my AjaxCall via JavaScript it works. Previously I used pure jquery $.ajax(...) and that does not work. kind regards Patrick Am 07.06.2013 14:02, schrieb Patrick Davids: Runs into WicketRuntimeExceptions (but they are catched). e.g.

Re: UrlResourceReference for images

2013-06-07 Thread Bertrand Guay-Paquet
What you're saying is that a client requests the url http://localhost:8080/app1 and the img src attribute has app2/image?item-123 but you want it to be http://localhost:8080/app2/image?item-123 instead? Why does it make a difference? The relative url will be resolved to

AjaxFallbackDefaultDataTable: cell not receiving event after sorting

2013-06-07 Thread dlock
Hi. I have a simple abstract panel that I display as a cell within an AjaxFallbackDefaultDataTable. The panel has a label and a WebComponent that shows an icon (based on passed in css). The WebComponent has an AjaxEventBehaviour(click) added and whenever the icon is clicked the handling is

Connecting... in Firefox's tab title

2013-06-07 Thread Guillaume Smet
Hi, For quite a while now, we are seeing a weird behavior with Firefox: as soon as Wicket does an Ajax call, the tab title is changed to Connecting... and it doesn't get back to the original page title at all, even after the Ajax call returned. Does anybody else see this behavior? We don't see

Re: UrlResourceReference for images

2013-06-07 Thread bronius
Yes that would be great, but src=app2/image?item-123 does not work (image is not loaded) and after changing it with firebug to src=http://localhost:8080/app2/image?item-123; works fine. Any ideas why is that? Any stupid mistake i overlooked? Maybe wicket interprets relative url as

Re: Connecting... in Firefox's tab title

2013-06-07 Thread Guillaume Smet
Hi, After some digging, it's related to the multipart ajax request via posting an iframe. The iframe is removed in the onload of the iframe ( see https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L868 ) and it seems to be

Re: UrlResourceReference for images

2013-06-07 Thread Bertrand Guay-Paquet
Try this: url.getSegments().add(); url.getSegments().add(site2); url.getSegments().add(image); Have a look at the code of Url#isAbsolute(). It checks if the first segment is empty which is not the case with the code you provided in the first email. This behavior of

Re: UrlResourceReference for images

2013-06-07 Thread harmoniaa
If you have src=app2/image?item-123 in a resource located in http://localhost:8080/app1/, it will be resolved as http://localhost:8080/app1/app2/image?item-123 as you noticed. Adding / to the beginning should help: src=/app2/image?item-123 should be resolved as

Re: UrlResourceReference for images

2013-06-07 Thread bronius
Hi, I just tried it and it worked! Thanks guys for help, this situation really surprised me :) On the bright side at least I learned about framework when solving this little problem of mine as its easy to go inside and check how it works (im quite new to wicket). Best regards! -- View this

Re: ResourceResponse processing Accept-Ranges

2013-06-07 Thread Maxim Solodovnik
Thanks a lot! It works as expected :) Maybe you can help me to fix/workaround following issue in mobile Chrome (Android 4.1.2, SGS2) When I open the file I got 2 requests 1) has valid session or is able to get session getAuthenticationStrategy().load() as a result player is displayed, movie time

Adding Class Attribute When Link Clicked

2013-06-07 Thread dhongyt
I'm trying to figure out 1. How to add class attribute to a link that is clicked. 2. Default homepage class link attribute to be active. I have look at this forum http://apache-wicket.1842946.n4.nabble.com/How-to-add-and-remove-css-classes-the-right-way-td1868408.html thinking it would help but

Re: Adding Class Attribute When Link Clicked

2013-06-07 Thread dhongyt
I see that my issue is that every time I click on the link my Navigationbar is created again. Thus having the active private variable always being HomePage. That's why I the active never changes. If I created a way for MainMenu to get and set the active page in the top level Repeater creation

session event

2013-06-07 Thread lc991
how I capture close windows event from user(from x in the upper right) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/session-event-tp4659287.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Adding Class Attribute When Link Clicked

2013-06-07 Thread dhongyt
Created a fix if any one is interested. I noticed that every time I clicked on my Navbar, the base page would always reload there for the Panel would always reset and would never know which one is select. In my Base Page I was about to do this.getClass() that gives me the current page loaded and

Can i display a WepPage in a PDF (How to get the rendered markup)?

2013-06-07 Thread Per Newgro
Hi, i would like to render a WebPage with flying saucer (PDF generator). I've created a resource reference and a ByteArrayResource. But now i need the rendered markup of the page (e.g. HomePage). So my question is how can i render the markup in my Resource? Thanks for your support Per

Re: Connecting... in Firefox's tab title

2013-06-07 Thread Sven Meier
Should I open a JIRA and should I attach a quickstart to it? Yes please. And don't forget to add the collected information to it. Thanks Sven On 06/07/2013 05:06 PM, Guillaume Smet wrote: Hi, After some digging, it's related to the multipart ajax request via posting an iframe. The iframe

Re: AjaxFallbackDefaultDataTable: cell not receiving event after sorting

2013-06-07 Thread Sven Meier
Hi, your solution looks good to me. Check the Ajax debug window for any problems with the requests. Then put a breakpoint on your behavior's #onEvent() and check whether is is triggered. Sven On 06/07/2013 04:15 PM, dlock wrote: Hi. I have a simple abstract panel that I display as a cell

Re: Can i display a WepPage in a PDF (How to get the rendered markup)?

2013-06-07 Thread Per Newgro
Found the solution already. I did it that way: public class FlyingSaucerPdfResource extends ByteArrayResource { public FlyingSaucerPdfResource() { super(application/pdf); } @Override protected byte[] getData(Attributes attributes) { ByteArrayOutputStream os;