Parameter Reference

WWB beanprops Parameter Reference

Note that any parameter value may contain a properties file macro reference in the form: ${propertyName}. This references a Wicket properties file property. For example:

    label: "Text before ${some.Property} text after";

Standard Bean Parameters

 	public void <i>doSomething</i>(AjaxRequestTarget target, Form form, Object bean)

The target parameter may be null for non-Ajax requests.

public Constructor(String id, final Object bean, BeanMetaData beanMetaData, TabMetaData tabMetaData)

where id = Wicket component ID

bean = the bean, or IModel containing the bean

beanMetaData = the BeanMetaData for bean

tabMetaData = the tab metadata

Standard Property Parameters

Actions (action.action-name) additionally support the following parameters (supported by BeanActionButton):

Standard Tab Parameters

Container-specific Parameters

BeanGridPanel

Displays its properties in a grid. The grid is evenly spaced across the width of the window.

BeanTablePanel

Displays a collection of beans in a table. Each property of the bean is a column in the table. The table also allows sorting of bean properties that are Comparable (which includes primitive and wrapper types). Note that BeanTableField (a Field for properties that are collections) allows a "rows" parameter to be specified for the table.

Property/Field-specific Parameters

BeanGridField

Displays a bean in a box with a label. No field-level parameters. This is the default field for properties whose type is otherwise not mapped in ComponentRegistry.

BeanInCollapsibleField

Displays a bean in a collapsible box with a label. No field-level parameters.

BeanInlineField

Displays a bean inline with other fields on the parent bean. No field-level parameters.

BeanTableField

Displays a property's collection as a list of beans in a table. See BeanTablePanel.

BeanWithParentLabelField

A Field that presents a property's bean in a panel, but the bean's properties do not have labels. For errors, the bean's properties use the parent property's label. This is useful for creating simple composite fields directly from small beans. No field-level parameters.

DateTimeField

java.util.Date, java.sql.Timestamp: yyyy-MM-dd HH:MM

java.sql.Time: HH:MM

java.sql.Date: yyyy-MM-dd

java.util.Calendar: yyyy-MM-dd HH:MM z

You may override this defaults in the enclosing Page's properties using the following keys:

DateTimeField.date.format - Format for java.sql.Date.

DateTimeField.datetime.format - Format for java.sql.Timestamp or java.util.Date.

DateTimeField.time.format - Format for java.sql.Time.

DateTimeField.datetimetz.format - Format for java.util.Calendar types.

EnumField/JavaEnumField

InputField

A common field used to accept input for a variety of primitive and wrapper property types.

TextAreaField

Defines a field for Strings that allows more than one line of input.

Third-Party Annotations

Certain JDO and JPA annotations are supported. Right now, certain attributes of the @Column annotation are supported. See Standard Property Parameters above for more details. Also see the net.sourceforge.wicketwebbeans.examples.thirdpartyannotations.AnnotationsBeanPage example.

For annotations to be effective at runtime, you must have the JDO or JPA annotation classes in your classpath. For web apps, this means having the appropriate JARs in your WEB-INF/lib directory.