deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r1607848 - /deltaspike/site/trunk/content/jsf.mdtext
Date Fri, 04 Jul 2014 13:23:12 GMT
Author: gpetracek
Date: Fri Jul  4 13:23:12 2014
New Revision: 1607848

URL: http://svn.apache.org/r1607848
Log:
updated content

Modified:
    deltaspike/site/trunk/content/jsf.mdtext

Modified: deltaspike/site/trunk/content/jsf.mdtext
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/jsf.mdtext?rev=1607848&r1=1607847&r2=1607848&view=diff
==============================================================================
--- deltaspike/site/trunk/content/jsf.mdtext (original)
+++ deltaspike/site/trunk/content/jsf.mdtext Fri Jul  4 13:23:12 2014
@@ -923,6 +923,26 @@ By just using `@InfoPage` in view-config
     ViewConfigDescriptor viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Index.class);
     List<InfoPage> metaDataList = viewConfigDescriptor.getMetaData(InfoPage.class)
 
+### Creating Custom Meta-Data via @ViewMetaData and @Stereotype
+
+Like with CDI itself you can encapsulate multiple view meta-data annotation in one annotation.
+
+e.g.:
+
+    :::java
+    @Target({TYPE})
+    @Retention(RUNTIME)
+
+    @Stereotype
+    @Secured(CustomAccessDecisionVoter.class) //view meta-data #1
+    @View(navigation = REDIRECT) //view meta-data #2
+    @interface MySecuredView {}
+
+Instead of using the same combination of annotations in multiple places, you can use the
stereotype annotation.
+If you query the meta-data at runtime (see `ViewConfigDescriptor#getMetaData`), you can access
`@Secured` as well as `@View` (in the example above). however, you won't see `@MySecuredView`
itself at runtime, because stereotype annotations are per default transparent.
+
+Since v1.0.1+ it's possible to access such stereotype annotations as well, once you annotate
them with `@ViewMetaData`.
+
 ### Creating Custom Callbacks via @ViewMetaData
 
 Via a custom ConfigPreProcessor it's possible to register custom callbacks dynamically.



Mime
View raw message