Thanks for the responses. Jeremy: That's really strange... when I put the ResourceReference inside the image constructor it did work for the png image. I still not having any luck getting my javascript and .swf files to load, but I will continue trying.
Igor: I made sure the IDE is copying all my filetypes into the classes folder, so that doesn't seem to be the problem in this case. I will update this topic if I figure out what I'm doing wrong. Jeremy Thomerson-5 wrote: > > Have you tried using it in an img tag rather than println? I.e.: > > add(new Image("img", ref)); > > > > -- > Jeremy Thomerson > http://www.wickettraining.com > > > > On Mon, Apr 13, 2009 at 11:38 AM, Ryan LaHue <ryanlahue...@gmail.com> > wrote: > >> I'm having trouble getting ResourceReferences to work for some reason, >> and >> was hoping somebody could give me some pointers. I'm using wicket 1.4. >> >> As a simple test I added a new page and put a "test.png" image in the >> same >> directory in my project. My structure is like so: >> project >> |--src >> |----mypkg >> |------test >> |--------TestResource.java >> |--------test.png >> |--public_html >> |----images >> |------test.png >> >> Java class: mypkg.test.TestResource.java >> ... >> ResourceReference ref = new ResourceReference(TestResource.class, >> "test.png"); >> System.out.println("Valid resource: " + (ref.getResource() != null)); >> ... >> >> This always returns false. I also tried putting the "test.png" in my >> public_html/images directory but no luck. I don't seem to have any luck >> getting these Resources to load correctly, so I've had to resort to >> hardcoding my javascript references into my html files. Anybody have any >> suggestions? I've verified that all the files are being copied to my >> output >> classes folder. >> > > -- View this message in context: http://www.nabble.com/ResourceReferences-not-working-as-expected-tp23024914p23026294.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org