You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by jchappelle <jc...@4redi.com> on 2012/07/26 21:31:23 UTC
Image urls with CryptoMapper
I'm hitting a problem with images not being found when using CryptoMapper. I
have 2 pages listed below. The dynamic image on the second page does not
show but it does on the first page. I get to the second page by clicking the
"Page 2" link on the first. The code below is from my quickstart I have
created. It is pretty small so I figured why not list it here. Any help is
appreciated.
public class Page1 extends WebPage
{
public Page1()
{
add(new ImagePanel("panel"));
add(new AjaxLink<Void>("page2Link")
{
@Override
public void onClick(AjaxRequestTarget target)
{
setResponsePage(Page2.class);
}
});
}
}
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<body>
<div wicket:id="panel"></div>
# Page 2
</body>
</html>
public class Page2 extends WebPage
{
public Page2()
{
add(new ImagePanel("panel"));
}
}
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<body>
<div wicket:id="panel"></div>
</body>
</html>
public class ImagePanel extends Panel
{
public ImagePanel(String id)
{
super(id);
add(new Label("dynamicImage", Model.of("Image Here:
images/arrow-up-green.gif ")).setEscapeModelStrings(false));
}
}
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org/">
<wicket:panel>
<div>Hard-Coded Image: images/arrow-up-green.gif </div>
<div>Dynamic Image: </div>
</wicket:panel>
</html>
public class WicketApplication extends WebApplication
{
@Override
public Class<? extends Page> getHomePage()
{
return Page1.class;
}
@Override
public void init()
{
super.init();
setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
}
}
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805.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: Image urls with CryptoMapper
Posted by jchappelle <jc...@4redi.com>.
Thanks Martin! I was hoping there was a static utility to rewrite that url.
I think this will get me what I need.
On Thu, Jul 26, 2012 at 3:50 PM, Martin Grigorov-4 [via Apache Wicket] <
ml-node+s1842946n4650814h6@n4.nabble.com> wrote:
> Hi,
>
> Either generate absolute urls from the backend service or if you are
> certain that the image url is context relative then pass it first to
> org.apache.wicket.core.util.string.UrlUtils#rewriteToContextRelative()
> before setting it in the model.
>
> On Thu, Jul 26, 2012 at 11:43 PM, jchappelle <[hidden email]<http://user/SendEmail.jtp?type=node&node=4650814&i=0>>
> wrote:
>
> > Sven,
> >
> > You closed this ticket but let me say this. I'm clearly not perfectly
> > reproducing what I am seeing in my live app. However, what is common is
> > that wicket is finding the hard-coded image on the second page because
> it
> > is rewriting the url of that image and it is not doing that for the
> dynamic
> > image. I believe this is the source of my problem in my live app because
> > when I look at the html the same thing is happening.
> >
> > Is there any advice you have on this issue?
> >
> > Josh
> >
> > On Thu, Jul 26, 2012 at 2:46 PM, Sven Meier [via Apache Wicket] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4650814&i=1>>
> wrote:
> >
> >> That's hard to say from the snippet you've provided here, especially
> >> since a few markup tags didn't make it through.
> >>
> >> Please create an issue and attach your quickstart to it.
> >>
> >> Sven
> >>
> >> On 07/26/2012 09:31 PM, jchappelle wrote:
> >>
> >> > I'm hitting a problem with images not being found when using
> >> CryptoMapper. I
> >> > have 2 pages listed below. The dynamic image on the second page does
> not
> >> > show but it does on the first page. I get to the second page by
> clicking
> >> the
> >> > "Page 2" link on the first. The code below is from my quickstart I
> have
> >> > created. It is pretty small so I figured why not list it here. Any
> help
> >> is
> >> > appreciated.
> >> >
> >> >
> >> > public class Page1 extends WebPage
> >> > {
> >> > public Page1()
> >> > {
> >> > add(new ImagePanel("panel"));
> >> > add(new AjaxLink<Void>("page2Link")
> >> > {
> >> > @Override
> >> > public void onClick(AjaxRequestTarget target)
> >> > {
> >> > setResponsePage(Page2.class);
> >> > }
> >> > });
> >> > }
> >> > }
> >> >
> >> > <!DOCTYPE html>
> >> > <html xmlns:wicket="http://wicket.apache.org">
> >> > <body>
> >> > <div wicket:id="panel"></div>
> >> > # Page 2
> >> > </body>
> >> > </html>
> >> >
> >> >
> >> > public class Page2 extends WebPage
> >> > {
> >> > public Page2()
> >> > {
> >> > add(new ImagePanel("panel"));
> >> > }
> >> > }
> >> >
> >> > <!DOCTYPE html>
> >> > <html xmlns:wicket="http://wicket.apache.org">
> >> > <body>
> >> > <div wicket:id="panel"></div>
> >> > </body>
> >> > </html>
> >> >
> >> >
> >> > public class ImagePanel extends Panel
> >> > {
> >> > public ImagePanel(String id)
> >> > {
> >> > super(id);
> >> >
> >> > add(new Label("dynamicImage", Model.of("Image Here:
> >> > images/arrow-up-green.gif ")).setEscapeModelStrings(false));
> >> > }
> >> > }
> >> >
> >> > <?xml version="1.0" encoding="UTF-8"?>
> >> > <html xmlns="http://www.w3.org/1999/xhtml"
> >> > xmlns:wicket="http://wicket.apache.org/">
> >> > <wicket:panel>
> >> > <div>Hard-Coded Image: images/arrow-up-green.gif </div>
> >> > <div>Dynamic Image: </div>
> >> > </wicket:panel>
> >> > </html>
> >> >
> >> > public class WicketApplication extends WebApplication
> >> > {
> >> > @Override
> >> > public Class<? extends Page> getHomePage()
> >> > {
> >> > return Page1.class;
> >> > }
> >> > @Override
> >> > public void init()
> >> > {
> >> > super.init();
> >> > setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
> >> > }
> >> > }
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >>
> http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805.html
> >> > Sent from the Users forum mailing list archive at Nabble.com.
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=4650806&i=0>
> >> > For additional commands, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=4650806&i=1>
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=4650806&i=2>
> >> For additional commands, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=4650806&i=3>
> >>
> >>
> >>
> >> ------------------------------
> >> If you reply to this email, your message will be added to the
> discussion
> >> below:
> >>
> >>
>
> >> .
> >> NAML<
> http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> >>
> >
> >
> >
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805p4650812.html
>
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650814&i=2>
> > For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650814&i=3>
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650814&i=4>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650814&i=5>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805p4650814.html
> To unsubscribe from Image urls with CryptoMapper, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4650805&code=amNoYXBwZWxsZUA0cmVkaS5jb218NDY1MDgwNXwtMTI5MjQyMjY0NQ==>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805p4650815.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: Image urls with CryptoMapper
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
Either generate absolute urls from the backend service or if you are
certain that the image url is context relative then pass it first to
org.apache.wicket.core.util.string.UrlUtils#rewriteToContextRelative()
before setting it in the model.
On Thu, Jul 26, 2012 at 11:43 PM, jchappelle <jc...@4redi.com> wrote:
> Sven,
>
> You closed this ticket but let me say this. I'm clearly not perfectly
> reproducing what I am seeing in my live app. However, what is common is
> that wicket is finding the hard-coded image on the second page because it
> is rewriting the url of that image and it is not doing that for the dynamic
> image. I believe this is the source of my problem in my live app because
> when I look at the html the same thing is happening.
>
> Is there any advice you have on this issue?
>
> Josh
>
> On Thu, Jul 26, 2012 at 2:46 PM, Sven Meier [via Apache Wicket] <
> ml-node+s1842946n4650806h58@n4.nabble.com> wrote:
>
>> That's hard to say from the snippet you've provided here, especially
>> since a few markup tags didn't make it through.
>>
>> Please create an issue and attach your quickstart to it.
>>
>> Sven
>>
>> On 07/26/2012 09:31 PM, jchappelle wrote:
>>
>> > I'm hitting a problem with images not being found when using
>> CryptoMapper. I
>> > have 2 pages listed below. The dynamic image on the second page does not
>> > show but it does on the first page. I get to the second page by clicking
>> the
>> > "Page 2" link on the first. The code below is from my quickstart I have
>> > created. It is pretty small so I figured why not list it here. Any help
>> is
>> > appreciated.
>> >
>> >
>> > public class Page1 extends WebPage
>> > {
>> > public Page1()
>> > {
>> > add(new ImagePanel("panel"));
>> > add(new AjaxLink<Void>("page2Link")
>> > {
>> > @Override
>> > public void onClick(AjaxRequestTarget target)
>> > {
>> > setResponsePage(Page2.class);
>> > }
>> > });
>> > }
>> > }
>> >
>> > <!DOCTYPE html>
>> > <html xmlns:wicket="http://wicket.apache.org">
>> > <body>
>> > <div wicket:id="panel"></div>
>> > # Page 2
>> > </body>
>> > </html>
>> >
>> >
>> > public class Page2 extends WebPage
>> > {
>> > public Page2()
>> > {
>> > add(new ImagePanel("panel"));
>> > }
>> > }
>> >
>> > <!DOCTYPE html>
>> > <html xmlns:wicket="http://wicket.apache.org">
>> > <body>
>> > <div wicket:id="panel"></div>
>> > </body>
>> > </html>
>> >
>> >
>> > public class ImagePanel extends Panel
>> > {
>> > public ImagePanel(String id)
>> > {
>> > super(id);
>> >
>> > add(new Label("dynamicImage", Model.of("Image Here:
>> > images/arrow-up-green.gif ")).setEscapeModelStrings(false));
>> > }
>> > }
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <html xmlns="http://www.w3.org/1999/xhtml"
>> > xmlns:wicket="http://wicket.apache.org/">
>> > <wicket:panel>
>> > <div>Hard-Coded Image: images/arrow-up-green.gif </div>
>> > <div>Dynamic Image: </div>
>> > </wicket:panel>
>> > </html>
>> >
>> > public class WicketApplication extends WebApplication
>> > {
>> > @Override
>> > public Class<? extends Page> getHomePage()
>> > {
>> > return Page1.class;
>> > }
>> > @Override
>> > public void init()
>> > {
>> > super.init();
>> > setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
>> > }
>> > }
>> >
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805.html
>> > Sent from the Users forum mailing list archive at Nabble.com.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650806&i=0>
>> > For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650806&i=1>
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650806&i=2>
>> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650806&i=3>
>>
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805p4650806.html
>> To unsubscribe from Image urls with CryptoMapper, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4650805&code=amNoYXBwZWxsZUA0cmVkaS5jb218NDY1MDgwNXwtMTI5MjQyMjY0NQ==>
>> .
>> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805p4650812.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
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Image urls with CryptoMapper
Posted by jchappelle <jc...@4redi.com>.
Sven,
You closed this ticket but let me say this. I'm clearly not perfectly
reproducing what I am seeing in my live app. However, what is common is
that wicket is finding the hard-coded image on the second page because it
is rewriting the url of that image and it is not doing that for the dynamic
image. I believe this is the source of my problem in my live app because
when I look at the html the same thing is happening.
Is there any advice you have on this issue?
Josh
On Thu, Jul 26, 2012 at 2:46 PM, Sven Meier [via Apache Wicket] <
ml-node+s1842946n4650806h58@n4.nabble.com> wrote:
> That's hard to say from the snippet you've provided here, especially
> since a few markup tags didn't make it through.
>
> Please create an issue and attach your quickstart to it.
>
> Sven
>
> On 07/26/2012 09:31 PM, jchappelle wrote:
>
> > I'm hitting a problem with images not being found when using
> CryptoMapper. I
> > have 2 pages listed below. The dynamic image on the second page does not
> > show but it does on the first page. I get to the second page by clicking
> the
> > "Page 2" link on the first. The code below is from my quickstart I have
> > created. It is pretty small so I figured why not list it here. Any help
> is
> > appreciated.
> >
> >
> > public class Page1 extends WebPage
> > {
> > public Page1()
> > {
> > add(new ImagePanel("panel"));
> > add(new AjaxLink<Void>("page2Link")
> > {
> > @Override
> > public void onClick(AjaxRequestTarget target)
> > {
> > setResponsePage(Page2.class);
> > }
> > });
> > }
> > }
> >
> > <!DOCTYPE html>
> > <html xmlns:wicket="http://wicket.apache.org">
> > <body>
> > <div wicket:id="panel"></div>
> > # Page 2
> > </body>
> > </html>
> >
> >
> > public class Page2 extends WebPage
> > {
> > public Page2()
> > {
> > add(new ImagePanel("panel"));
> > }
> > }
> >
> > <!DOCTYPE html>
> > <html xmlns:wicket="http://wicket.apache.org">
> > <body>
> > <div wicket:id="panel"></div>
> > </body>
> > </html>
> >
> >
> > public class ImagePanel extends Panel
> > {
> > public ImagePanel(String id)
> > {
> > super(id);
> >
> > add(new Label("dynamicImage", Model.of("Image Here:
> > images/arrow-up-green.gif ")).setEscapeModelStrings(false));
> > }
> > }
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <html xmlns="http://www.w3.org/1999/xhtml"
> > xmlns:wicket="http://wicket.apache.org/">
> > <wicket:panel>
> > <div>Hard-Coded Image: images/arrow-up-green.gif </div>
> > <div>Dynamic Image: </div>
> > </wicket:panel>
> > </html>
> >
> > public class WicketApplication extends WebApplication
> > {
> > @Override
> > public Class<? extends Page> getHomePage()
> > {
> > return Page1.class;
> > }
> > @Override
> > public void init()
> > {
> > super.init();
> > setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
> > }
> > }
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650806&i=0>
> > For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650806&i=1>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650806&i=2>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650806&i=3>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805p4650806.html
> To unsubscribe from Image urls with CryptoMapper, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4650805&code=amNoYXBwZWxsZUA0cmVkaS5jb218NDY1MDgwNXwtMTI5MjQyMjY0NQ==>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805p4650812.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: Image urls with CryptoMapper
Posted by jchappelle <jc...@4redi.com>.
Issue created.
https://issues.apache.org/jira/browse/WICKET-4678
https://issues.apache.org/jira/browse/WICKET-4678
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805p4650809.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: Image urls with CryptoMapper
Posted by Sven Meier <sv...@meiers.net>.
That's hard to say from the snippet you've provided here, especially
since a few markup tags didn't make it through.
Please create an issue and attach your quickstart to it.
Sven
On 07/26/2012 09:31 PM, jchappelle wrote:
> I'm hitting a problem with images not being found when using CryptoMapper. I
> have 2 pages listed below. The dynamic image on the second page does not
> show but it does on the first page. I get to the second page by clicking the
> "Page 2" link on the first. The code below is from my quickstart I have
> created. It is pretty small so I figured why not list it here. Any help is
> appreciated.
>
>
> public class Page1 extends WebPage
> {
> public Page1()
> {
> add(new ImagePanel("panel"));
> add(new AjaxLink<Void>("page2Link")
> {
> @Override
> public void onClick(AjaxRequestTarget target)
> {
> setResponsePage(Page2.class);
> }
> });
> }
> }
>
> <!DOCTYPE html>
> <html xmlns:wicket="http://wicket.apache.org">
> <body>
> <div wicket:id="panel"></div>
> # Page 2
> </body>
> </html>
>
>
> public class Page2 extends WebPage
> {
> public Page2()
> {
> add(new ImagePanel("panel"));
> }
> }
>
> <!DOCTYPE html>
> <html xmlns:wicket="http://wicket.apache.org">
> <body>
> <div wicket:id="panel"></div>
> </body>
> </html>
>
>
> public class ImagePanel extends Panel
> {
> public ImagePanel(String id)
> {
> super(id);
>
> add(new Label("dynamicImage", Model.of("Image Here:
> images/arrow-up-green.gif ")).setEscapeModelStrings(false));
> }
> }
>
> <?xml version="1.0" encoding="UTF-8"?>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:wicket="http://wicket.apache.org/">
> <wicket:panel>
> <div>Hard-Coded Image: images/arrow-up-green.gif </div>
> <div>Dynamic Image: </div>
> </wicket:panel>
> </html>
>
> public class WicketApplication extends WebApplication
> {
> @Override
> public Class<? extends Page> getHomePage()
> {
> return Page1.class;
> }
> @Override
> public void init()
> {
> super.init();
> setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
> }
> }
>
>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805.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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Image urls with CryptoMapper
Posted by jchappelle <jc...@4redi.com>.
Well, in my actual live application I don't have that option. We are
sending a query to a web service and part of the response from that web
service has these image links embedded in it. So we are using a label to
display them just as I am doing in the quickstart.
As you can see in the quickstart, there is an ImagePanel which has a
hard-coded image, which only lives in html and then a dynamic image, which
is created within a wicket label. That ImagePanel is reused on both pages.
The dynamic image on the second page shows a red x in the browser. In fact
if you look at the src attribute you will see that wicket has modified the
src attribute of the hard-coded img tag to this
"../../../images/arrow-up-green.gif" however it left the other unchanged.
Everything works if the CryptoMapper is not the root mapper.
Josh
On Thu, Jul 26, 2012 at 3:25 PM, michael mosmann [via Apache Wicket] <
ml-node+s1842946n4650810h82@n4.nabble.com> wrote:
> I have some questions. How does the first img-tag on the second page
> differ from the first one? Why dont you use a wicket image component?
>
> Mm:)
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
> gesendet.
>
>
>
> jchappelle <[hidden email]<http://user/SendEmail.jtp?type=node&node=4650810&i=0>>
> schrieb:
>
> I went back and edited my post. It might not have come through the mailing
> list but if you look at it from the nabble website it shows up.
>
> Josh
>
> On Thu, Jul 26, 2012 at 2:57 PM, michael mosmann [via Apache Wicket] <
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4650810&i=1>>
> wrote:
>
> > Are you sure, that your panel markup works? I can not see any wicket Tag
> > in it?
> > --
> > Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
> > gesendet.
> >
> >
> >
> > jchappelle <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=4650807&i=0>>
> > schrieb:
> >
> > I'm hitting a problem with images not being found when using
> CryptoMapper.
> > I
> > have 2 pages listed below. The dynamic image on the second page does not
> > show but it does on the first page. I get to the second page by clicking
> > the
> > "Page 2" link on the first. The code below is from my quickstart I have
> > created. It is pretty small so I figured why not list it here. Any help
> is
> > appreciated.
> >
> >
> > public class Page1 extends WebPage
> > {
> > public Page1()
> > {
> > add(new ImagePanel("panel"));
> > add(new AjaxLink<Void>("page2Link")
> > {
> > @Override
> > public void onClick(AjaxRequestTarget target)
> > {
> > setResponsePage(Page2.class);
> > }
> > });
> > }
> > }
> >
> > <!DOCTYPE html>
> > <html xmlns:wicket="http://wicket.apache.org">
> > <body>
> > <div wicket:id="panel"></div>
> > # Page 2
> > </body>
> > </html>
> >
> >
> > public class Page2 extends WebPage
> > {
> > public Page2()
> > {
> > add(new ImagePanel("panel"));
> > }
> > }
> >
> > <!DOCTYPE html>
> > <html xmlns:wicket="http://wicket.apache.org">
> > <body>
> > <div wicket:id="panel"></div>
> > </body>
> > </html>
> >
> >
> > public class ImagePanel extends Panel
> > {
> > public ImagePanel(String id)
> > {
> > super(id);
> >
> > add(new Label("dynamicImage", Model.of("Image Here:
> > images/arrow-up-green.gif ")).setEscapeModelStrings(false));
> > }
> > }
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <html xmlns="http://www.w3.org/1999/xhtml"
> > xmlns:wicket="http://wicket.apache.org/">
> > <wicket:panel>
> > <div>Hard-Coded Image: images/arrow-up-green.gif </div>
> > <div>Dynamic Image: </div>
> > </wicket:panel>
> > </html>
> >
> > public class WicketApplication extends WebApplication
> > {
> > @Override
> > public Class<? extends Page> getHomePage()
> > {
> > return Page1.class;
> > }
> > @Override
> > public void init()
> > {
> > super.init();
> > setRootRequestMapper(new
> > CryptoMapper(getRootRequestMapper(), this));
> > }
> > }
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> >_____________________________________________
>
> >
> > To unsubscribe, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=4650807&i=1>
> > For additional commands, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=4650807&i=2>
> >
> >
> >
> >_____________________________________________
>
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
>
> > .
> > NAML<
> http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespa
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805p4650810.html
> To unsubscribe from Image urls with CryptoMapper, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4650805&code=amNoYXBwZWxsZUA0cmVkaS5jb218NDY1MDgwNXwtMTI5MjQyMjY0NQ==>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805p4650811.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: Image urls with CryptoMapper
Posted by jchappelle <jc...@4redi.com>.
I went back and edited my post. It might not have come through the mailing
list but if you look at it from the nabble website it shows up.
Josh
On Thu, Jul 26, 2012 at 2:57 PM, michael mosmann [via Apache Wicket] <
ml-node+s1842946n4650807h89@n4.nabble.com> wrote:
> Are you sure, that your panel markup works? I can not see any wicket Tag
> in it?
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
> gesendet.
>
>
>
> jchappelle <[hidden email]<http://user/SendEmail.jtp?type=node&node=4650807&i=0>>
> schrieb:
>
> I'm hitting a problem with images not being found when using CryptoMapper.
> I
> have 2 pages listed below. The dynamic image on the second page does not
> show but it does on the first page. I get to the second page by clicking
> the
> "Page 2" link on the first. The code below is from my quickstart I have
> created. It is pretty small so I figured why not list it here. Any help is
> appreciated.
>
>
> public class Page1 extends WebPage
> {
> public Page1()
> {
> add(new ImagePanel("panel"));
> add(new AjaxLink<Void>("page2Link")
> {
> @Override
> public void onClick(AjaxRequestTarget target)
> {
> setResponsePage(Page2.class);
> }
> });
> }
> }
>
> <!DOCTYPE html>
> <html xmlns:wicket="http://wicket.apache.org">
> <body>
> <div wicket:id="panel"></div>
> # Page 2
> </body>
> </html>
>
>
> public class Page2 extends WebPage
> {
> public Page2()
> {
> add(new ImagePanel("panel"));
> }
> }
>
> <!DOCTYPE html>
> <html xmlns:wicket="http://wicket.apache.org">
> <body>
> <div wicket:id="panel"></div>
> </body>
> </html>
>
>
> public class ImagePanel extends Panel
> {
> public ImagePanel(String id)
> {
> super(id);
>
> add(new Label("dynamicImage", Model.of("Image Here:
> images/arrow-up-green.gif ")).setEscapeModelStrings(false));
> }
> }
>
> <?xml version="1.0" encoding="UTF-8"?>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:wicket="http://wicket.apache.org/">
> <wicket:panel>
> <div>Hard-Coded Image: images/arrow-up-green.gif </div>
> <div>Dynamic Image: </div>
> </wicket:panel>
> </html>
>
> public class WicketApplication extends WebApplication
> {
> @Override
> public Class<? extends Page> getHomePage()
> {
> return Page1.class;
> }
> @Override
> public void init()
> {
> super.init();
> setRootRequestMapper(new
> CryptoMapper(getRootRequestMapper(), this));
> }
> }
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> _____________________________________________
>
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650807&i=1>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4650807&i=2>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805p4650807.html
> To unsubscribe from Image urls with CryptoMapper, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4650805&code=amNoYXBwZWxsZUA0cmVkaS5jb218NDY1MDgwNXwtMTI5MjQyMjY0NQ==>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Image-urls-with-CryptoMapper-tp4650805p4650808.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