Package org.openxava.annotations
Annotation Interface NewView
View of the referenced object used to create a new one from a reference or collection.
Example for a collection:
Applies to references and collections.
If you omit this annotation, then the default view of the referenced object
is used when creating a new object from the reference. With this annotation
you can indicate that it uses another view.
Example for a reference:
@ManyToOne
@NewView("SimpleCreation")
private Seller seller;
For collections, this annotation overrides the view specified by
CollectionView when creating a new element. If you use
@CollectionView("Simple") it's equivalent to using both
@NewView("Simple") and @EditView("Simple").
You can use @NewView to specify a different view just for creation.Example for a collection:
@OneToMany(mappedBy="invoice")
@CollectionView("Simple")
@NewView("SimpleCreation") // Overrides @CollectionView for creation
private Collection<InvoiceDetail> details;
- Since:
- 7.7
- Author:
- Javier Paniza
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionList of comma separated view names where this annotation applies.List of comma separated view names where this annotation does not apply.
-
Element Details
-
value
String valueName of a view present in the referenced object to use for creation.
-
-
-
forViews
String forViewsList of comma separated view names where this annotation applies.Exclusive with notForViews.
If both forViews and notForViews are omitted then this annotation apply to all views.
You can use the string "DEFAULT" for referencing to the default view (the view with no name).- Default:
- ""
-
notForViews
String notForViewsList of comma separated view names where this annotation does not apply.Exclusive with forViews.
If both forViews and notForViews are omitted then this annotation apply to all views.
You can use the string "DEFAULT" for referencing to the default view (the view with no name).- Default:
- ""
-