You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by James Carman <ja...@carmanconsulting.com> on 2008/03/16 16:14:19 UTC
PackageResource Images
Is there an easier way to do package-resourced images in Wicket? It's
pretty easy now, but it seems somewhat redundant to have to do:
public class MyPage extends WebPage
{
public MyPage
{
add(new Image("logo"));
}
}
<img src="images/logo.png" wicket:id="logo" />
Perhaps we could add a new "wicket:" attribute? Then it would be:
<img src="images/logo.png" wicket:img-type="package" />
I don't know about the attribute name, though. This would allow you
to add package-resourced images without having to create Image
components in your Java code (not that it's really that difficult).
Thoughts?
Re: PackageResource Images
Posted by James Carman <ja...@carmanconsulting.com>.
On 3/17/08, Johan Compagner <jc...@gmail.com> wrote:
> There is something that i think is called a printer ;)
>
I thought about that, but I get update emails when the MEAP version is
updated. I'd hate to miss out on the new editions. :) Plus 373 pages
would cost quite a bit to print. I'll wait for the actual hard-copy.
Re: PackageResource Images
Posted by Johan Compagner <jc...@gmail.com>.
There is something that i think is called a printer ;)
On 3/16/08, James Carman <ja...@carmanconsulting.com> wrote:
> On 3/16/08, Martijn Dashorst <ma...@gmail.com> wrote:
> > It's in the book :-)
>
> I didn't get to that part yet! I'm working my way through it. It's a
> very nice read so far. I can't wait for the hard copy. I don't like
> reading PDFs on a computer.
>
Re: PackageResource Images
Posted by James Carman <ja...@carmanconsulting.com>.
On 3/16/08, Martijn Dashorst <ma...@gmail.com> wrote:
> It's in the book :-)
I didn't get to that part yet! I'm working my way through it. It's a
very nice read so far. I can't wait for the hard copy. I don't like
reading PDFs on a computer.
Re: PackageResource Images
Posted by Martijn Dashorst <ma...@gmail.com>.
It's in the book :-)
Martijn
On 3/16/08, James Carman <ja...@carmanconsulting.com> wrote:
> On 3/16/08, Martijn Dashorst <ma...@gmail.com> wrote:
> > <wicket:link><img src="logo.gif" /></wicket:link>
> >
>
>
> Ahhh! Thanks. Very nice! That should be on the wiki for autolink
> (that images can be autolinked too).
>
--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1
Re: PackageResource Images
Posted by James Carman <ja...@carmanconsulting.com>.
On 3/16/08, Martijn Dashorst <ma...@gmail.com> wrote:
> <wicket:link><img src="logo.gif" /></wicket:link>
>
Ahhh! Thanks. Very nice! That should be on the wiki for autolink
(that images can be autolinked too).
Re: PackageResource Images
Posted by Martijn Dashorst <ma...@gmail.com>.
<wicket:link><img src="logo.gif" /></wicket:link>
Martijn
On 3/16/08, James Carman <ja...@carmanconsulting.com> wrote:
> Is there an easier way to do package-resourced images in Wicket? It's
> pretty easy now, but it seems somewhat redundant to have to do:
>
> public class MyPage extends WebPage
> {
> public MyPage
> {
> add(new Image("logo"));
> }
> }
>
> <img src="images/logo.png" wicket:id="logo" />
>
> Perhaps we could add a new "wicket:" attribute? Then it would be:
>
> <img src="images/logo.png" wicket:img-type="package" />
>
> I don't know about the attribute name, though. This would allow you
> to add package-resourced images without having to create Image
> components in your Java code (not that it's really that difficult).
> Thoughts?
>
--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1