hopefully this week I get <wicket:link> sorted out. Than you simple do
<head>
<wicket:link>
<link ... href="styles.css"/>
</wicket:link>
</head>
and that is it. No java at all. The PackageResource will be
automatically created for you. Thus style.css goes next to the html
file in the same directory.
Juergen
On 8/24/05, Scott Sauyet <[EMAIL PROTECTED]> wrote:
> Yeah, I'm probably behind. I pulled the build down as recently as
> Monday, but that's ages ago in Internet time, escpecially when not
> getting the sources from CVS.
>
> I do think that it would be nice to replace all this with something like:
>
> addToCSSHeader(Tree.class, "tree.css");
>
> but I suppose I'm assuming too much about the CSS being co-located with
> the class file. Still it would be really clean.
>
> Now repeat after me: "Static bad. Static bad. Static bad..." :-)
>
> -- Scott
>
> Eelco Hillenius wrote:
> > Yep, though my guess is that you are looking at older sources, as
> > StaticResourceReference is now PackageResourceReference. Basically, we
> > had the proof again (for the 10.000th time :)) that static is evil, so
> > we changed our package resource loading algoritm. There have been
> > posts about this last week.
> >
> > Also, in wicket-extensions, I put a couple of classes so that you
> > don't have to do the whole adding of the attribute modifier etc. Maybe
> > we should put that in core, as I think they are very convenient
> > (unfortunately I have no cvs access until this weekend).
> >
> > Eelco
> >
> >
> > On 8/24/05, Scott Sauyet <[EMAIL PROTECTED]> wrote:
> >
> >>I didn't find the DatePicker yet, but if I understand Tree, correctly,
> >>this is fairly straightforward. It looks as though this is handled
> >>through the HTML using
> >>
> >> <wicket:head>
> >> <link wicket:id="css" rel="StyleSheet" type="text/css"
> >> href="tree.css" />
> >> </wicket:head>
> >>
> >>and with the following Java:
> >>
> >> private static final StaticResourceReference CSS =
> >> new StaticResourceReference(Tree.class, "tree.css");
> >>
> >> ...
> >>
> >> IModel hrefReplacement = new Model() {
> >> public Object getObject(Component component) {
> >> return getPage().urlFor(CSS.getPath());
> >> };
> >> };
> >> WebMarkupContainer css = new WebMarkupContainer("css");
> >> css.add(new AttributeModifier("href", true, hrefReplacement));
> >> addToHeader(css);
> >>
> >>This is definitely simpler than the example in the wiki, and looks
> >>pretty straightforward.
> >>
> >>Is my understanding correct?
> >>
> >>Thanks for the help,
> >>
> >> -- Scott
> >>
> >>Eelco Hillenius wrote:
> >>
> >>>For a start, take a look at how Tree does it. For a slighly more
> >>>complex one, look at DatePicker, which is part of the extensions
> >>>project.
> >>>
> >>>Eelco
> >>>
> >>>
> >>>On 8/24/05, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>>Wicket provides several difference means to reference css and js
> >>>>files. Unfortunately the documentation is perfect, ... What exactly is
> >>>>your problem or your question. In the simplest case use plain (X)HTML
> >>>>without any wicket specific code. <head><link ...
> >>>>href="style.css"></head>. The examples may serve as references as
> >>>>well.
> >>>>
> >>>>Juergen
> >>>>
> >>>>On 8/24/05, Scott Sauyet <[EMAIL PROTECTED]> wrote:
> >>>>
> >>>>
> >>>>>Obligatory disclaimer: I'm brand new to Wicket. I'm trying to use it
> >>>>>on my first project.</o-d>
> >>>>>
> >>>>>The Wiki page on including CSS references for components
> >>>>>(http://tinyurl.com/8aqp5) finishes with this comment:
> >>>>>
> >>>>> "A better integrated way of dealing with CSS, JavaScript, etc,
> >>>>> is planned for Wicket 1.1, which is scheduled for summer 2005."
> >>>>>
> >>>>>The method described in this page is a somewhat convoluted process of
> >>>>>visiting all the children of the page that implement a HeaderContributor
> >>>>>interface. I was wondering if this "better integrated way" is now
> >>>>>available, and if so, if there is any documentation available.
> >>>>>
> >>>>>Thanks,
> >>>>>
> >>>>> -- Scott Sauyet
> >>>>>
> >>>>>
> >>>>>
> >>>>>-------------------------------------------------------
> >>>>>SF.Net email is Sponsored by the Better Software Conference & EXPO
> >>>>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> >>>>>Practices
> >>>>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
> >>>>>QA
> >>>>>Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> >>>>>_______________________________________________
> >>>>>Wicket-user mailing list
> >>>>>[email protected]
> >>>>>https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>>>>
> >>>>
> >>>>
> >>>>-------------------------------------------------------
> >>>>SF.Net email is Sponsored by the Better Software Conference & EXPO
> >>>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> >>>>Practices
> >>>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> >>>>Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> >>>>_______________________________________________
> >>>>Wicket-user mailing list
> >>>>[email protected]
> >>>>https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>>>
> >>>
> >>>
> >>>
> >>>-------------------------------------------------------
> >>>SF.Net email is Sponsored by the Better Software Conference & EXPO
> >>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> >>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> >>>Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> >>>_______________________________________________
> >>>Wicket-user mailing list
> >>>[email protected]
> >>>https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>
> >>-------------------------------------------------------
> >>SF.Net email is Sponsored by the Better Software Conference & EXPO
> >>September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> >>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> >>Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> >>_______________________________________________
> >>Wicket-user mailing list
> >>[email protected]
> >>https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user