hmm right, could I just embed it in the html page then, I guess the answer is yes?
I guess the reason I took this path was because of the texttemplateresourcereference which seems to do something much like this. regards Nino 2010/10/8 Igor Vaynberg <igor.vaynb...@gmail.com> > what you are trying to do doesnt make sense, think about it. > > how is wicket supposed to build a url to your anonymous reference instance? > > you have two options, use renderCssReference(String url) to output the > url to your custom css or if you need to stream it from somewhere > inaccessible by the browser you can create a shared resource or a > servlet > > -igor > > On Fri, Oct 8, 2010 at 2:44 AM, nino martinez wael > <nino.martinez.w...@gmail.com> wrote: > > Has someone an idea? > > > > I am just trying to read a custom css from a string and render it as a > > reference on the page. > > > > Do I need to register the reference somewhere or sormething? > > > > 2010/10/7 nino martinez wael <nino.martinez.w...@gmail.com> > > > >> Hi > >> > >> I cant get below working: > >> > >> public void renderHead(IHeaderResponse response) { > >> super.renderHead(response); > >> if (wallboardConfigurationModel.getObject().hasCustomCss()) { > >> final StringResourceStream stringResourceStream = new > >> StringResourceStream( > >> wallboardConfigurationModel.getObject().getCustomCss(), > >> "text/css"); > >> > >> ResourceReference resourceReference = new ResourceReference( > >> wallboardConfigurationModel.getObject().getId()) { > >> @Override > >> public IResource getResource() { > >> return new ResourceStreamResource(stringResourceStream); > >> } > >> }; > >> response.renderCSSReference(resourceReference); > >> > >> } > >> } > >> > >> I get this out put in the log: > >> > >> 010-10-07 15:33:57,555 WARN > >> [org.apache.wicket.request.resource.ResourceReferenceRegistry] - Asked > to > >> auto-create a ResourceReference, but > >> ResourceReferenceRegistry.createDefaultResourceReference() return null. > >> [scope: org.apache.wicket.Application; name: test1; locale: null; > style: > >> null; variation: null] > >> 2010-10-07 15:33:57,555 ERROR > >> [org.apache.wicket.request.cycle.RequestCycle] - Unable to execute > request. > >> No suitable RequestHandler found. > >> URL=wicket/resource/org.apache.wicket.Application/test1 > >> > >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >