PacktLib: Apache Wicket Cookbook

Apache Wicket Cookbook

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Validating and Converting User Input

Introduction

Performing form-level custom validation

Creating a custom validator

Composing multiple validators into a single reusable validator

Converting string inputs to objects

Getting Down and Dirty with Forms and Form Components

Introduction

Creating linked selectboxes

Composing multiple form components into a single reusable component

Preventing multiple form submits

Protecting against spam with a CAPTCHA

Making Forms Presentable

Introduction

Changing form component CSS class on validation errors

Using FeedbackPanel to output form component specific messages

Streamlining form component presentation using behaviors

Taking your Application Abroad

Introduction

Storing module resource strings in package properties

Retrieving a localized string

Feeding dynamic localized strings to components using StringResourceModel

Using wicket:message to output localized markup

Overriding localized resources on a case by case basis

Displaying Data Using DataTable

Introduction

Sorting

Filtering

Making cells clickable

Making rows selectable with checkboxes

Exporting data to CSV

Enhancing your UI with Tabs and Borders

Introduction

Creating tabs with dynamic titles

Making a tabbed panel play nice with forms

Creating a client-side JavaScript tabbed panel

Using borders to decorate components

Creating a collapsible border

Deeper into Ajax

Introduction

Adding Ajax validation to individual form components

Blocking until an Ajax request is complete

Providing Ajax feedback automatically

Visualizing Data with Charts

Introduction

Charting with Open Flash Chart

Feeding chart data using a SharedResource

Responding to clicks

Building Dynamic and Rich UI

Introduction

Swapping components using a select box

Creating dynamic forms

Creating a dynamic portal layout

Securing your Application

Introduction

Creating a login page and forcing the user to log in

Authenticating with OpenID

Securing components using IAuthorizationStrategy

Securing URLs and protecting against cross-site request forgery

Switching from HTTP to HTTPS and back again

Integrating Wicket with Middleware

Introduction

Integrating with Spring

Integrating with CDI

Populating repeaters from a JPA query

Creating a model for a JPA entity

Index