Skip to content
Tobias Soloschenko edited this page Apr 30, 2015 · 8 revisions

Minis Project

About

WicketStuff Minis is a collection of assorted components and behaviors that are too small to warrant their own project.

Maven snippet

Add this to your pom.xml:

<dependency>
	<groupId>org.wicketstuff</groupId>
	<artifactId>wicketstuff-minis</artifactId>
	<version>[some-version]</version>
</dependency>

Behaviors & Validators

ImageDimensionProvider & AbstractImageDimensionProvider

Simple behaviors to provide width + height attributes for html img tags. Specifying dimensions can speed up page rendering.

StringValidatorWithMaxLength

Similar to wicket's StringValidator this class can be used to construct exact length, max length, length between validators. The difference is that these validators also add a "maxlength" attribute to the html input element they are bound to.

Components

DefaultInvisibleFeedbackPanel

A simple FeedbackPanel variant which is only visible if there are messages attached to it. Useful if your designer is putting always visible elements (like border, sign image) on your feedback panels.

ReplacingResourceModel (6.20.0 / 7.0.0-M6)

The ReplacingResourceModel is used to replaced other keys marked up like ${key} with their corresponding values in the given key. The replacing mechanism also uses the default way to get the localized String.

Java:

add(new Label("label", new ReplacingResourceModel("key2")));

HTML:

<span wicket:id="label"></span>

Properties:

key1=value of key1
key2=value of key2 contains ${key1}

Output:

value of key2 contains value of key1

Dependencies

Wicketstuff-minis depends only on wicket.

Further reading

The above lists of behaviors, components are not complete. For more info see the javadoc of the classes. For examples see the minis-examples web application.

Clone this wiki locally