Hi,

You can use:
Class componentClass = component.getClass();
InputStream htmlStream =
componentClass.getResourceAsStream(componentClass.getSimpleName() +
".html");


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Mar 1, 2016 at 12:09 PM, Ilia <[email protected]> wrote:

> Hello!
> I have the following object
> NamePanel.class
> NamePanel.html
> NamePage.class
> NamePage.html
> Onclick button I need to get the path of the page for further conversion
> html to pdf
> buttonSave.add(new AjaxEventBehavior("onclick") {
>             @Override
>             protected void onEvent(final AjaxRequestTarget target) {
>                 String path = target.getPage().getPageRelativePath();
>                 new FileInputStream(path);
>
> }
>         });
>
> >new FileInputStream(path);
> Method threw 'java.io.FileNotFoundException' exception.
>
> Please help me.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/How-get-path-html-page-tp4673768.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to