Get started with wicket CDN

GPL-3.0 licensed

Wicket is a Java Web Application framework that provides a component-oriented model for building dynamic web applications and includes a small library for interacting with the generated HTML.

Tags:
  • wkt
  • map
  • mapping
  • geometry
  • leaflet

Stable version

Copied!

How to start using wicket CDN


// Create a new Wicket application instance
class MyWicketApplication extends Wicket.Application {
  constructor() {
    super();
  }

  init() {
    super.init();

    // Configure the application
    this.getMarkupSettings().setDefaultMarkup(Wicket.IO.Markup.XML);
    this.getMarkupSettings().setStripWicketTags(false);
  }
}

// Define a Wicket component
class MyComponent extends Wicket.Component {
  constructor(id) {
    super(id);
  }

  onInitialize() {
    super.onInitialize();

    // Add some content to the component
    this.add(new Wicket.Label("label", "Hello, Wicket!"));
  }
}

// Initialize the application and create a new page
Wicket.Application.init(new MyWicketApplication(), document.getElementById("wicketContainer"));

// Create a new Wicket page and add the component to it
class MyPage extends Wicket.Page {
  constructor() {
    super("MyPage");

    // Add the component to the page
    this.add(new MyComponent("component"));
  }
}

// Create a new instance of the page and display it
new MyPage().render();
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions