org.openxava.annotations
Annotation Type View


@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface View

Defines with precision the format of the user interface or view.

Applies to entities.

Example:

  @Entity
  @View(members=
    "year, number, date, paid;" +
    "discounts [" +
    "    customerDiscount, customerTypeDiscount, yearDiscount;" +
    "];" +
    "comment;" +                 
    "customer { customer }" +
    "details { details }" +                      
    "amounts { amountsSum; vatPercentage; vat }" +
    "deliveries { deliveries }"          
  )
  public class Invoice {
  ...
 

Author:
Javier Paniza

Optional Element Summary
 java.lang.String members
          Indicates the members to display and its layout in the user interface.
 java.lang.String name
          This name identifies the view.
 

name

public abstract java.lang.String name
This name identifies the view.

It can be used in other OpenXava places (for example in application.xml) or from another entities.
This name is referenced from forViews or notForViews of other OpenXava annotations.
If the view has no name then the view is assumed as the default one, that is the natural form to display an object of this type.

Default:
""

members

public abstract java.lang.String members
Indicates the members to display and its layout in the user interface.

Use comma (,) for separating elements, and semicolon (;) for new line.
You can use section {} and group [] elements for layout purposes; or actions ( MyController.myAction() ) element for showing a link associated to a custom action inside your view.

Default:
""