You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by MyScheme <ka...@web.de> on 2013/12/09 13:51:16 UTC
Re: Example for presenting pdf in modal window
hey Ernesto,
I could not find a new example for embedding a Pdf in wicket so i tried your
code from 2009.But i always get a Null Pointer at
this.resourceListener.onResourceRequested(); using your Code.
Caused by: java.lang.NullPointerException
at org.apache.wicket.Resource.onResourceRequested(Resource.java:120)
at
DocumentInlineFrame.DocumentInlineFrame.onResourceRequested(DocumentInlineFrame.java:63)
... 33 more
The only thing i had to change in your example was
urlFor(IResourceListener.INTERFACE, null). I am using wicket Version 6.XX
Greetings,
Patrick
Ps.: my IDE is not filtering pdfs
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-for-presenting-pdf-in-modal-window-tp1879547p4662859.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Example for presenting pdf in modal window
Posted by MyScheme <ka...@web.de>.
Hey,
Cleared the Cache but the document is still shown on the web side. Maybe the
Adobe Reader saves the file somewhere?
CSS z-index are not working. The calendar which opens on click is still in
the background of the DocumentInlineFrame.
Thanks for your help,
Patrick
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-for-presenting-pdf-in-modal-window-tp1879547p4663111.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Example for presenting pdf in modal window
Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Dec 18, 2013 at 3:20 PM, MyScheme <ka...@web.de> wrote:
> Hey,
>
> The Java code runs without any errors, but the InlineFrame sametimes loads
> the wrong pdf files. When i open the page the first time it always loads a
> File i deleted 13 days ago. I can’t even find it on my pc anymore... The
>
Sounds like a caching issue.
Clear the caches in your browser.
Also add: webResponse.disableCaching() in the code that delivers the PDF to
prevent the same problem in the future
> code is the standard code from git and the Folder contains only the right
> pdf.
>
> myInlineFrame = new DocumentInlineFrame("mypdf",
> new FileResourceStream(
> "D:\\test\\mypdf.pdf"));
>
> theForm.add(myInlineFrame)
>
> The second Problem is that the InlineFrame is in the front. So when i add a
> DateField with a calender oder the InlineFrame the Calender opens behind
> the
> InlineFrame and is not visible. how can i change that?
>
Google: CSS z-index
>
> Sry for all these questions but I am a beginner and do not know anybody
> else
> to ask.
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Example-for-presenting-pdf-in-modal-window-tp1879547p4663108.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Example for presenting pdf in modal window
Posted by MyScheme <ka...@web.de>.
Hey,
The Java code runs without any errors, but the InlineFrame sametimes loads
the wrong pdf files. When i open the page the first time it always loads a
File i deleted 13 days ago. I can’t even find it on my pc anymore... The
code is the standard code from git and the Folder contains only the right
pdf.
myInlineFrame = new DocumentInlineFrame("mypdf",
new FileResourceStream(
"D:\\test\\mypdf.pdf"));
theForm.add(myInlineFrame)
The second Problem is that the InlineFrame is in the front. So when i add a
DateField with a calender oder the InlineFrame the Calender opens behind the
InlineFrame and is not visible. how can i change that?
Sry for all these questions but I am a beginner and do not know anybody else
to ask.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-for-presenting-pdf-in-modal-window-tp1879547p4663108.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Example for presenting pdf in modal window
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
On Thu, Dec 12, 2013 at 5:21 PM, MyScheme <ka...@web.de> wrote:
> Thank you very much!
>
> But another Problem occurred while running your code. I need to load a Pdf
> file saved in a global path (like: D:/Users/test.pdf) and update the
> DocumentInlineFrame when a button was clicked. That´s why I tried to load
> your program with
> new DocumentInlineFrame("mypdf",new FileResourceStream(new
> File("file:///D:/Users/test.pdf)));
> is this possible? And what do I have to do to update this
>
It should be possible.
Did you face any errors ?
> DocumentInlineFrame to a new pdf without reloading the hole page´(to like
> D:/Users/sectest.pdf)?
>
You can add setResource[Stream]() method to DocumentInlineFrame and change
the resource dynamically.
And then you can re-render the frame with Ajax.
>
> Regards Patrick
>
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Example-for-presenting-pdf-in-modal-window-tp1879547p4662957.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Example for presenting pdf in modal window
Posted by MyScheme <ka...@web.de>.
Thank you very much!
But another Problem occurred while running your code. I need to load a Pdf
file saved in a global path (like: D:/Users/test.pdf) and update the
DocumentInlineFrame when a button was clicked. That´s why I tried to load
your program with
new DocumentInlineFrame("mypdf",new FileResourceStream(new
File("file:///D:/Users/test.pdf)));
is this possible? And what do I have to do to update this
DocumentInlineFrame to a new pdf without reloading the hole page´(to like
D:/Users/sectest.pdf)?
Regards Patrick
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-for-presenting-pdf-in-modal-window-tp1879547p4662957.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Example for presenting pdf in modal window
Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
According to POM
<wicket.version>6.6.0</wicket.version>
I guess it will work as well for latest wicket.
On Mon, Dec 9, 2013 at 4:50 PM, Ernesto Reinaldo Barreiro <
reiern70@gmail.com> wrote:
> Hi,
>
> https://github.com/reiern70/antilia-bits/tree/master/content-iframe
>
>
> I think this is the same example ported to Wicket 6
>
>
>
> On Mon, Dec 9, 2013 at 1:51 PM, MyScheme <ka...@web.de> wrote:
>
>> hey Ernesto,
>>
>> I could not find a new example for embedding a Pdf in wicket so i tried
>> your
>> code from 2009.But i always get a Null Pointer at
>> this.resourceListener.onResourceRequested(); using your Code.
>>
>> Caused by: java.lang.NullPointerException
>> at
>> org.apache.wicket.Resource.onResourceRequested(Resource.java:120)
>> at
>>
>> DocumentInlineFrame.DocumentInlineFrame.onResourceRequested(DocumentInlineFrame.java:63)
>> ... 33 more
>>
>> The only thing i had to change in your example was
>> urlFor(IResourceListener.INTERFACE, null). I am using wicket Version 6.XX
>>
>> Greetings,
>>
>> Patrick
>>
>> Ps.: my IDE is not filtering pdfs
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Example-for-presenting-pdf-in-modal-window-tp1879547p4662859.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>
--
Regards - Ernesto Reinaldo Barreiro
Re: Example for presenting pdf in modal window
Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Hi,
https://github.com/reiern70/antilia-bits/tree/master/content-iframe
I think this is the same example ported to Wicket 6
On Mon, Dec 9, 2013 at 1:51 PM, MyScheme <ka...@web.de> wrote:
> hey Ernesto,
>
> I could not find a new example for embedding a Pdf in wicket so i tried
> your
> code from 2009.But i always get a Null Pointer at
> this.resourceListener.onResourceRequested(); using your Code.
>
> Caused by: java.lang.NullPointerException
> at
> org.apache.wicket.Resource.onResourceRequested(Resource.java:120)
> at
>
> DocumentInlineFrame.DocumentInlineFrame.onResourceRequested(DocumentInlineFrame.java:63)
> ... 33 more
>
> The only thing i had to change in your example was
> urlFor(IResourceListener.INTERFACE, null). I am using wicket Version 6.XX
>
> Greetings,
>
> Patrick
>
> Ps.: my IDE is not filtering pdfs
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Example-for-presenting-pdf-in-modal-window-tp1879547p4662859.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Regards - Ernesto Reinaldo Barreiro