jslibraries documentation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

jslibraries documentation

Donohoe Digital
I'm migrating some wicket 1.4 era code to 1.5 and am looking for documentation on the new JSLib and Library functionality.  For example, what is the proper call to make for this using JSLib?

  /**
     * Add prototype to header
     */
    @Override
    public void renderHead(IHeaderResponse response)
    {
        response.renderJavascriptReference(PrototypeResourceReference.INSTANCE);
    }
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: jslibraries documentation

Donohoe Digital
This seems to work:

  /**
   * Add prototype to header
   */
  override def renderHead(component: Component, response: IHeaderResponse)
  {
    val header = JSLib.getHeaderContribution(VersionDescriptor.alwaysLatest(Library.PROTOTYPE))
    header.renderHead(response)
  }
Loading...