We have shown the way to use AspectFaces.
You only need to pass data instance and you get the form/table
or the desired output. You may also specify a layout to use.

All tis is done through run-time component inspection and adhoc metamodel generation.
This metamodel is then filtered and transformed to the UI output.

Lets look at the transformation, so that you can customize the output.
UI components/widgets to use are defined through templates. These templates are then
registered in the configuration file.
The configuration file specifies mapping between entity fields and components.

Notice that each component is applied through templates and its mapping can be adjusted
to fit any situation for given context or can be influenced by runtime.

To see more about how to pass an instance to the inspection and set the output context @see tab Basics

In the template you can use inspected information that only depends on the passed data instance.
You can switch by '$' to the evaluation environment and cou close it by '$'. It works like Evaluation Expession so you canevaluate anithing you have in the context.

For example:

$field.firstToUpper()$ gives field name and transfroms it to uppercase

$entityBean.shortClassName().firstToLower()$ gives class name and transforms the first letter lowercase

$required$ check whether the JPA or your ORM requires the field

$field.value.length() > 3 ? 'ok' : 'tiny'$ this takes the field as string and determines it lenght (in fact you evaluate String)

$util.getValue().lookup('tooltip',entityBean.shortClassName().firstToLower(),field) you can add to context "context.getVariables().put("util", new Util());" your custom Class and call its methods from EL ($$)

PrimeFaces configuration
Each data type can have a mapping including defaul tag to use, conditional tag or default context.
Consider String type and possible options, you can differntiate options based on variable
name (you may include package) or a condition that is EL evaluated thus such as in
component templates you can use context variables logical and aritmetical operations, etc.
Furthermore you can ignore fields such as "version". By your own context injection
("context.getVariables().put("util", new Util());") all sort of things can be added (security, location detection, screen size, etc.)

com.codingcrayons.aspectfaces.exceptions.TemplateFileAccessException: Cannot load layout file ../../layouts/grrtwo-column-layout.xhtml
at com.codingcrayons.aspectfaces.composition.UIFragmentComposer.composeLayoutedForm(UIFragmentComposer.java:247)
at com.codingcrayons.aspectfaces.composition.UIFragmentComposer.composeForm(UIFragmentComposer.java:128)
at com.codingcrayons.aspectfaces.AFWeaver.generate(AFWeaver.java:620)
at com.codingcrayons.aspectfaces.AFWeaver.generate(AFWeaver.java:470)
at com.codingcrayons.aspectfaces.ondemand.AFGeneratorHandler.generateAsString(AFGeneratorHandler.java:380)
at com.codingcrayons.aspectfaces.ondemand.AFGeneratorHandler.generateAsIS(AFGeneratorHandler.java:350)
at com.codingcrayons.demoapp.view.aspectfaces.AdaptiveAFGeneratorHandler.hookCustomInputStream(AdaptiveAFGeneratorHandler.java:80)
at com.codingcrayons.aspectfaces.ondemand.DefaultAFGeneratorHandler.hookInputStreamToApply(DefaultAFGeneratorHandler.java:61)
at com.sun.faces.facelets.impl.GeneratorHandler.apply(GeneratorHandler.java:183)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:166)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
at com.sun.faces.facelets.tag.ui.DecorateHandler.apply(DecorateHandler.java:145)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:107)
at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178)
at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395)
at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366)
at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:112)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:774)
at org.jboss.seam.faces.view.SeamViewDeclarationLanguage.buildView(SeamViewDeclarationLanguage.java:81)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:118)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at com.codingcrayons.demoapp.util.EncodingFilter.doFilter(EncodingFilter.java:26)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397)
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
at java.lang.Thread.run(Thread.java:701)
Caused by: com.codingcrayons.aspectfaces.exceptions.TemplateFileNotFoundException: File /WEB-INF/af/profile/primeFaces/tags/../../layouts/grrtwo-column-layout.xhtml not found.
at com.codingcrayons.aspectfaces.plugins.j2ee.configuration.ServerConfiguration.getTemplate(ServerConfiguration.java:66)
at com.codingcrayons.aspectfaces.configuration.Configuration.getTag(Configuration.java:251)
at com.codingcrayons.aspectfaces.composition.UIFragmentComposer.composeLayoutedForm(UIFragmentComposer.java:245)
... 100 more

As shown in the intro tab, the data instance is inspected and the meta-model
is populated with information about Class, fields and their constraints.

Constraints and extensions are captured by annotations. This is already done
for Object-relational mapping with JPA, Hibernate and others, it is done by
Javax Validation or Hibernate Validation, thus all this information can be
inspected and reused.

Although, sometimes we need to add more ad thus we provide (1) our own
extension package and its inspector (2) extension mechanism for you to play.

Our package includes things missing in JPA and
Validation such as order, string meaning, extension, before and after field insertion, etc.

Extension mechanism is trivial. Design your annotations. And for each annotation implement descriptor that injects annotation properies to the data instance context (you can select config context or template context, or both).
Then register your annotation descriptors to "/WEB-INF/aspectfaces-config.xml" and register in web.xml a servlet
"com.codingcrayons.aspectfaces.plugins.j2ee.AspectFacesServletSeam3".
Then you can annotate your data model and adjust mapping.