Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## com.opensymphony.xwork2.util
Annotation Type KeyProperty

    @Retention(value=RUNTIME)
    @Target(value={FIELD,METHOD})
    public @interface KeyProperty

Sets the KeyProperty for type conversion.

Annotation usage:

The KeyProperty annotation must be applied at field or method level.

This annotation should be used with Generic types, if the key property of the key element needs to be specified.

Annotation parameters:

Parameter | Required | Default | Description
--- | --- | --- | ---
value | no | id | The key property value.

Example code:

     // The key property for User objects within the users collection is the userName attribute.
     @KeyProperty( value = "userName" )
     protected List users = null;

Author:
  Patrick Lightbody, Rainer Hermanns

Optional Element Summary
`String` | `value` The KeyProperty value.

### value

    public abstract String value

  The KeyProperty value. Defaults to the `id` attribute.

  Default:
    "id"

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.