org.pm4j.core.pm.annotation
Annotation Type PmBeanCfg


@Retention(value=RUNTIME)
@Target(value={TYPE,FIELD})
public @interface PmBeanCfg

Bean presentation model attributes.

Author:
olaf boede

Required Element Summary
 java.lang.Class<?> beanClass
           
 
Optional Element Summary
 boolean autoCreateBean
          The PM may automatically create a backing bean instance in case it is null.
 java.lang.String findBeanExpr
          An expression to find the bean to be used behind this PM.
 java.lang.String key
          The identifier attribute(s) of the bean behind the PM.
 boolean readOnly
           
 

Element Detail

beanClass

public abstract java.lang.Class<?> beanClass
Returns:
The type of bean that can be handled by this presentation model.

autoCreateBean

public abstract boolean autoCreateBean
The PM may automatically create a backing bean instance in case it is null.
The type of the bean to create may be specified by beanClass().

This feature saves some code for pages that create and edit new bean instances.

Returns:
true if auto create will happen in case of a found bean value of null.
Default:
false

findBeanExpr

public abstract java.lang.String findBeanExpr
An expression to find the bean to be used behind this PM.

The default value is an empty string. It defines no expression will be used to find an associated bean.

See PmExpressionApi for more information about PM expressions.

Returns:
An expression that addresses the object to use.
Default value is an empty string.
Default:
""

key

public abstract java.lang.String key
The identifier attribute(s) of the bean behind the PM.

Returns:
A comma separated list of attribute names that identifies this instance.
Default:
"id"

readOnly

public abstract boolean readOnly
Returns:
true for PMs with attribute values that shouldn't be changed.
Default:
false