Errr, or you could use the Image component, with a standard package
resource?

Regards,

Alastair


On Mon, Mar 31, 2008 at 8:26 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> On Mon, Mar 31, 2008 at 11:44 AM, Matthew Young <[EMAIL PROTECTED]> wrote:
> >
> >  src="resources/com.mycompany.component.MyComponent/open.png"
>
> or just <wicket:link><img src="open.png"/></wicket:link>
>
> >  >so i would say, no, it takes 10 minutes to write one
> >
> >  I completely agree it's very trivial to create.... after getting help
> here
> >  :)   Still I commit error by holding on to Class reference (thanks for
> >  pointing out).  If there is such class built-in, then no chance for
> such
> >  error and this use case is taken care of.
>
> so you make the same error in some other component you write. this is
> just something you have to be aware of.
>
> >  Well, this is the thing: you know Wicket inside out. Stuffs that are
> trivial
> >  for you may not be so trivial to regular Wicket user.  But I totally
> >  understand your reluctance to add stuff to Wicket.  It's like adding
> key
> >  words to Java, the answer is almost always "no".  So if not adding
> these
> >  "little trivial" stuff, a wiki showing all the "little image" use cases
> >  would be great.
>
> what you have done you could have done after reading wicket in action,
> or some other book. resource handling is something framework specific,
> so you have to invest a little learning time.
>
> >  Anyway, I am not happy with my little PackageImage class.  I want to
> allow
> >  application to override the image files to have different look and only
> >  fallback to the built-in images, just like localization. How can this
> be
> >  done?
>
> src=getstring("somekey",null,"defaultvalue");
>
> -igor
>
> >
> >  On Mon, Mar 31, 2008 at 4:35 AM, James Carman <
> [EMAIL PROTECTED]>
> >  wrote:
> >
> >
> >
> >  > On Mon, Mar 31, 2008 at 12:28 AM, Matthew Young <[EMAIL PROTECTED]>
> wrote:
> >  > > >wicket:link doesnt touch components afaik
> >  > >
> >  > >  :(((((  I need it to be a component.  My code is basically this:
> >  > >
> >  > >                 add(new WebMarkupContainer("img"));
> >  >
> >  > Why do you need it to be a component?  Are you controlling the
> >  > visibility of it via code?
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >  > For additional commands, e-mail: [EMAIL PROTECTED]
> >  >
> >  >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to