response.renderJavascriptReference(new *PackageResourceReference*(HistoricoBehavior.class, "MyComponent.js"));
On Fri, Jan 20, 2012 at 12:43 AM, Oscar Besga <[email protected]> wrote: > Hello. > > > I'm working into a wicket (1.4) project that now is in production, but we > have decided to move it from Wicket 1.4 to Wicket 1.5 - and correct/add > some features. > > I've some problems with the migration, I can't find how to translate some > code from one version to another. > > My greatest problem is: > > I've a component with javascript code attached. The javascrit code is in a > file named equal as the class, f. ex. MyComponent.java MyComponent.js; in > the same package. > > In Wicket 1.4 ; I simply use one line int he onRenderHead method > <code> > @Override > public void renderHead(IHeaderResponse response) { > response.renderJavascriptReference(new > ResourceReference(HistoricoBehavior.class, "MyComponent.js")); > super.renderHead(response); > } > </code> > > I've tried with PackcageResource, a custom resource, etc. but I haven't > found a working way... > > Have someone any ideas ? > > > > > > -- > > > > > Oscar Besga Arcauz < < < -- thank you, regards, Vineet Semwal --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
