|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@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 {
...
| Optional Element Summary | |
|---|---|
java.lang.String |
extendsView
Name of a view to be extended by this one. |
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. |
public abstract java.lang.String name
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.
public abstract java.lang.String extendsView
All the members (including sections) of the extendsView are included
by default. Moreover, all the members defined in this view
(using members) are added to their.
That is, if you have:
public abstract java.lang.String members
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||