Skip to content

RomanSery/wicket-ui-fields

Repository files navigation

wicket-fields - Wicket UI components

Quick start | Documentation | Demo webapp | Screenshots

Requirements

  • Wicket 8+
  • Java 8+
  • Jquery

Dependencies

Key Features

  • Includes various text, date, dropdown, multi-select, numeric, radio, and checkbox fields
  • Simple, consistent syntax based on the Builder pattern is used to instantiate any type of field
  • No HTML required, just add a placeholder tag, and the HTML is created for you
  • All field are easily customizable using .properties files. Supports multiple locals/environments.
  • Easily toggle fields from read-write to read-only
  • Optimized for Wicket page sizes by minimizing number of components created
  • Includes full sample webapp demonstrating usage of each field

Including from Maven

<dependency>
  <groupId>com.coderdreams</groupId>
  <artifactId>wicket-fields</artifactId>
  <version>1.0.0</version>
</dependency>

Quick start

// 1. In your WebApplication.init() method, initialize the WicketFieldsUI library
WicketFieldsUI.init(this);
// 2. Add the UiFieldsBehavior to your WebPage which will add all the neccessary resources
add(new UiFieldsBehavior());
// 3. Add the placeholder tag for your field in your .html file
<span wicket:id="userFirstName"></span>
// 4. Add the field to your WebPage
add(new TxtField<String>(FieldArgs.Builder.of("userFirstName", "First Name", LambdaModel.of(user::getFirstName, formData::setFirstName)).build()));
// 5. When you are done adding your fields, send the InitPanelFieldsEvent event to notify them to init themselves
send(this, Broadcast.BREADTH, new InitPanelFieldsEvent(null));

Screenshots

Alt text Alt text Alt text Alt text Alt text