Overview
Search
Other MyFaces Extensions
Community
- [Mailing Lists]
...
While Ext-Scripting is already in stable state, the best way to get started is probably to checkout and build Ext-Scripting yourself from the latest codebase. All other installation steps will have this step as prerequisite if you want to use the latest codebase instead of one of the beta releases! First you have to check out the latest codebase from http://svn.apache.org/repos/asf/myfaces/extensions/scripting/trunk||||\ via a Subversion client.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<context-param>
<description>Additional comma separated loader paths to allow direct editing on the sources directory instead
of the deployment dir
</description>
<param-name>org.apache.myfaces.extensions.scripting.groovy.LOADER_PATHS</param-name>
<param-value>
<some project path>/src/main/webapp/WEB-INF/groovy
</param-value>
</context-param>
<context-param>
<description>Additional comma separated loader paths to allow direct editing on the sources directory instead
of the deployment dir
</description>
<param-name>org.apache.myfaces.extensions.scripting.java.LOADER_PATHS</param-name>
<param-value>
<some project path>/src/main/webapp/WEB-INF/java
</param-value>
</context-param>
<context-param>
<description>Additional comma separated loader paths to allow direct editing on the sources directory instead
of the deployment dir
</description>
<param-name>org.apache.myfaces.extensions.scripting.scala.LOADER_PATHS</param-name>
<param-value>
<some project path>/src/main/webapp/WEB-INF/scala
</param-value>
</context-param>
|
Additionally Ext-Scripting allows the reloading of dynamic web resources like Facelets templates images css files etc... An additional config param is available to enable this functionality.
Code Block | ||||
---|---|---|---|---|
| ||||
<!-- ====================================================================================== Optional Loader Paths for resource files ====================================================================================== --> <context-param> <description>resource paths for our custom JSF2 resource resolver</description> <param-name>org.apache.myfaces.extensions.scripting.resources.LOADER_PATHS</param-name> <param-value> ~/extensions-scripting3/examples/myfaces20-example/src/main/webapp </param-value> </context-param> <!-- ====================================================================================== Optional: Tell Facelets to load the resources from your source dir ====================================================================================== --> <context-param> <description>a redirecting Facelet resource resolver which allows to pick up templates and resources from our source dir </description> <param-name>facelets.RESOURCE_RESOLVER</param-name> <param-value>org.apache.myfaces.extensions.scripting.jsf.facelet.MyFacesReroutingResourceResolver</param-value> </context-param> |
This sums up the quick install and setup guide, if you want more detailed setup examples and additional configuration entries go to our Example Configurations(TODO add link here) page, which shows a set of different configurations.
The last possible config entry is the ability to whitelist packages. If you have set this option then only whitelisted packages will be picked up for dynamic recompilation.
With this option you can point your source dir to the normal compile source and mark special packages as dynamic (to isolate the dynamic part from the rest)
To enable this option, add following entry to your web.xml:
Code Block | ||||
---|---|---|---|---|
| ||||
<!-- ======================================================================================
Optional: Whitelist of root packages where your sources should come from
====================================================================================== -->
<context-param>
<description>a comma separated whitelist of root packages which are compiled those and nothing else
will be compiled during all compile stages, all other files stay permanently as they are
</description>
<param-name>org.apache.myfaces.extensions.scripting.PGK_WHITELIST</param-name>
<param-value>org.apache.myfaces.groovyloader.blog,org.apache.myfaces.javaloader.blog</param-value>
</context-param>
|
From a Ext-Scripting perspective, dropping the extscript-cdi war into your libraries dir is enough to enable Openwebbeans support, however you have to have Openwebbeans installed properlywhich means you have to add a beans.xml file to your META-INF directory and you have to add following entry to your web.xml file: