Re: Display PDF in new tab

2017-03-07 Thread SeldonCrisis
Awesome! Thanks Martin! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Display-PDF-in-new-tab-tp4677202p4677266.html Sent from the Users forum mailing list archive at Nabble.com. - To

Re: Display PDF in new tab

2017-03-07 Thread Martin Grigorov
On Tue, Mar 7, 2017 at 9:00 PM, Martin Grigorov wrote: > > On Tue, Mar 7, 2017 at 5:09 PM, SeldonCrisis wrote: > >> Sure, I can do that! *BUT* in exchange, I'll need /a little/ more help... >> >> I basically used the solution that Ernesto had provided

Re: Display PDF in new tab

2017-03-07 Thread Martin Grigorov
On Tue, Mar 7, 2017 at 5:09 PM, SeldonCrisis wrote: > Sure, I can do that! *BUT* in exchange, I'll need /a little/ more help... > > I basically used the solution that Ernesto had provided for us, I just > needed to spend some time understanding how it worked: > AJAX update

Re: Display PDF in new tab

2017-03-07 Thread SeldonCrisis
Sure, I can do that! *BUT* in exchange, I'll need /a little/ more help... I basically used the solution that Ernesto had provided for us, I just needed to spend some time understanding how it worked: AJAX update and file download in one blow

Re: Display PDF in new tab

2017-03-05 Thread Ernesto Reinaldo Barreiro
Better than thanks, which are accepted with gratitude, would be also sharing your solution :-) So, that also other guys could benefit ;-) On Fri, Mar 3, 2017 at 4:13 PM, SeldonCrisis wrote: > Got it figured out. Thank you everyone for your help > > -- > View this message in

Re: Display PDF in new tab

2017-03-03 Thread SeldonCrisis
Got it figured out. Thank you everyone for your help -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Display-PDF-in-new-tab-tp4677202p4677240.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Display PDF in new tab

2017-03-02 Thread Martin Grigorov
Hi, I'd recommend you to use plain JS to make the Label visible. AjaxButton yourAjaxButtonWithResource = new AjaxButton("button) { @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { attributes.getAjaxCallListeners().add(new

Re: Display PDF in new tab

2017-03-02 Thread SeldonCrisis
OK, thanks Ernesto and everyone else. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Display-PDF-in-new-tab-tp4677202p4677230.html Sent from the Users forum mailing list archive at Nabble.com. - To

Re: Display PDF in new tab

2017-03-02 Thread Ernesto Reinaldo Barreiro
See. https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow There was some work to move such functionality to wicket core. You need some variation of it, I guess. On Mar 2, 2017 17:30, "SeldonCrisis" wrote: > Yes, sorry for the spam.

Re: Display PDF in new tab

2017-03-02 Thread SeldonCrisis
Yes, sorry for the spam. I kept forgetting to enclose the html in . My fault. OK, so ideally I want to create an AjaxButton that when pressed would serve my custom resource (extending ByteArrayResource) in a new tab and simultaneously setEnabled(true) and setVisible(true) on a Label in my page.

Re: Display PDF in new tab

2017-03-01 Thread Ernesto Reinaldo Barreiro
Got lost with some many self responses :-) What do you want to achieve now? AJAX + SHOW PDF? On Wed, Mar 1, 2017 at 10:41 PM, SeldonCrisis wrote: > I've already seen this reference document, but I skipped over it thinking > it > did not apply to my problem (Probably as a

Re: Display PDF in new tab

2017-03-01 Thread SeldonCrisis
I've already seen this reference document, but I skipped over it thinking it did not apply to my problem (Probably as a result of my lack of Wicket experience). I will go ahead and carefully read through it again to see if I can figure this out. Thanks! -- View this message in context:

Re: Display PDF in new tab

2017-03-01 Thread Claudia Hirt
Hi, Maybe this solution could help you: https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow Von meinem iPhone gesendet > Am 01.03.2017 um 21:20 schrieb SeldonCrisis : > > Actually, scratch that. My question is now: How do I add Ajax

Re: Display PDF in new tab

2017-03-01 Thread SeldonCrisis
Actually, scratch that. My question is now: How do I add Ajax events to resourceLink so that I can enable/disable certain components after having served my resource? OR how do I use my resourceReference in an AjaxButton to actually serve the resource? ResourceLink practically takes care of that

Re: Display PDF in new tab

2017-03-01 Thread SeldonCrisis
Actually, scratch that. My question is now: How do I add Ajax events to resourceLink so that I can enable/disable certain components after having served my resource? OR how do I use my resourceReference in an AjaxButton to actually serve the resource? ResourceLink practically takes care of that

Re: Display PDF in new tab

2017-03-01 Thread SeldonCrisis
Actually, scratch that. My question is now: How do I add Ajax events to resourceLink so that I can enable/disable certain components after having served my resource? OR how do I use my resourceReference in an AjaxButton to actually serve the resource? ResourceLink practically takes care of that

Re: Display PDF in new tab

2017-03-01 Thread SeldonCrisis
Actually, scratch that. My question is now: How do I add Ajax events to resourceLink so that I can enable/disable certain components after having served my resource? I've tried this HTML trick: but I end up with this error: Unable to find component with id 'resourceButton' in [ResourceLink

Re: Display PDF in new tab

2017-03-01 Thread SeldonCrisis
Actually, scratch that. My question is now: How do I add Ajax events to resourceLink so that I can enable/disable certain components after having served my resource? I've tried this HTML trick: <> Im a button but I end up with this error: Unable to find component with id 'resourceButton' in

Re: Display PDF in new tab

2017-03-01 Thread SeldonCrisis
NEVERMIND, I figured it out. It's embarassing how easy that was... Click Me! Thanks again guys -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Display-PDF-in-new-tab-tp4677202p4677216.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Display PDF in new tab

2017-03-01 Thread SeldonCrisis
Thank you both very much, your answers were quite helpful. And thanks to you twice Martin, since you wrote the useful article that was linked here as well. Just out of curiousity, is there a button equivalent of resourceLink? I could just style a link to look like a button through CSS, but I'm

Re: Display PDF in new tab

2017-02-28 Thread SeldonCrisis
Thank you both, that was exactly what I was looking for. The wicket in action article in particular was very helpful as well, so thanks to you twice Martin! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Display-PDF-in-new-tab-tp4677202p4677205.html Sent from the

Re: Display PDF in new tab

2017-02-27 Thread Martin Grigorov
Hi, Also see ResourceLink and DownloadLink components. Since you want to show the file in the browser you will have to set the Content-Disposition response header to 'INLINE'. You talk about form submit, so you may need to use (Ajax)SubmitLink with target="_blank" on its or a Button but then

Re: Display PDF in new tab

2017-02-27 Thread Ernesto Reinaldo Barreiro
if your link point to the generated resource e.g. /resources/mypdf?id= and you add target="_blank" that should be do it. See http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ On Mon, Feb 27, 2017 at 9:56 PM, SeldonCrisis wrote: > Hey guys, I'm pretty