You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Juan Gabriel Arias <ju...@gmail.com> on 2008/02/02 17:50:23 UTC
Re: TreeTable icons and customization
Great, that works around the issue of reference the image.
But... what about the idea of no hard-code the images?
Maybe I can use a properties file... or just put it special wicket: tags in
my markup.
Thanks!
Juan
On Jan 31, 2008 4:42 PM, Matej Knopp <ma...@gmail.com> wrote:
> you can override LabelIconPanel#newImageComponent and create a
> WebMarkupContainer instead of an ImageContainer.
> on the WebMarkupContainer override onComponentTag and set the src
> attribute to where your image is.
>
> -Matej
>
>
> On Jan 31, 2008 7:03 PM, Juan Gabriel Arias <ju...@gmail.com> wrote:
> > Hi all
> > i've found several threads about this subject, but none of them really
> > helped me with the issue i'm dealing rigth now...
> > I want to customize icons for the TreeTable, but i need to put images in
> a
> > specific path and i would prefer not to hard code image names.
> > So, question is:
> >
> > How can i reference an image with an specific path, _different_ from
> > container-class package?
> > My class is com.foo.LabelIconPanel and my image is in
> > "/images/icons/bla.gif"
> >
> > I've looking in ResourceReference (the object used by LinkIconPanel) but
> i
> > cant find a way to do this.
> >
> > About hard-code or not hard-code, i already solve a similar problem
> putting
> > special/custom wicket tags in html. And, for example, to set alternate
> > styles to different rows ina table, i wrote
> >
> > <table>
> > <tr wicket:id="myTable" wicket:rowStyle="rowStyle"
> > wicket:alternateStyle="rowAlternateStyle">
> > <td>...</td>
> > </tr>
> > </table>
> >
> > Then, in MyTable.java, i access the attributes with
> > getMarkupAttributes().get("wicket:rowStyle")
> >
> > What do you think?
> >
> > Thanks in advance!
> > Juan
> >
>
>
>
> --
> Resizable and reorderable grid components.
> http://www.inmethod.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: TreeTable icons and customization
Posted by Matej Knopp <ma...@gmail.com>.
First of all, the images are not hardcoded. There are multiple ways of
specifying the images, you simply have to subclass certain methods. If
you want to specify images in property files it's easy to implement.
If you want to specify images through CSS, use your own
LabelIconPanel that does that.
-Matej
On Feb 2, 2008 5:50 PM, Juan Gabriel Arias <ju...@gmail.com> wrote:
> Great, that works around the issue of reference the image.
>
> But... what about the idea of no hard-code the images?
> Maybe I can use a properties file... or just put it special wicket: tags in
> my markup.
>
> Thanks!
> Juan
>
>
> On Jan 31, 2008 4:42 PM, Matej Knopp <ma...@gmail.com> wrote:
>
> > you can override LabelIconPanel#newImageComponent and create a
> > WebMarkupContainer instead of an ImageContainer.
> > on the WebMarkupContainer override onComponentTag and set the src
> > attribute to where your image is.
> >
> > -Matej
> >
> >
> > On Jan 31, 2008 7:03 PM, Juan Gabriel Arias <ju...@gmail.com> wrote:
> > > Hi all
> > > i've found several threads about this subject, but none of them really
> > > helped me with the issue i'm dealing rigth now...
> > > I want to customize icons for the TreeTable, but i need to put images in
> > a
> > > specific path and i would prefer not to hard code image names.
> > > So, question is:
> > >
> > > How can i reference an image with an specific path, _different_ from
> > > container-class package?
> > > My class is com.foo.LabelIconPanel and my image is in
> > > "/images/icons/bla.gif"
> > >
> > > I've looking in ResourceReference (the object used by LinkIconPanel) but
> > i
> > > cant find a way to do this.
> > >
> > > About hard-code or not hard-code, i already solve a similar problem
> > putting
> > > special/custom wicket tags in html. And, for example, to set alternate
> > > styles to different rows ina table, i wrote
> > >
> > > <table>
> > > <tr wicket:id="myTable" wicket:rowStyle="rowStyle"
> > > wicket:alternateStyle="rowAlternateStyle">
> > > <td>...</td>
> > > </tr>
> > > </table>
> > >
> > > Then, in MyTable.java, i access the attributes with
> > > getMarkupAttributes().get("wicket:rowStyle")
> > >
> > > What do you think?
> > >
> > > Thanks in advance!
> > > Juan
> > >
> >
> >
> >
> > --
> > Resizable and reorderable grid components.
> > http://www.inmethod.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
--
Resizable and reorderable grid components.
http://www.inmethod.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org