RichFaces-Fast-JSF
From Resin 3.0
Contents |
Running RichFaces and Ajax4JSF applications in fast-jsf mode
Fast JSF
Resin allows running your JSF applications in fast jsf mode. Fast JSF mode is applied to JSP code generator making it bypass JSP tags and use the component classes directly to construct component tree defined in the JSP flie. To enable fast JSF mode for a particular library Resin needs to know which components the tags bind to. E.g. in a standard JSF library a h:message component would bind to javax.faces.component.html.HtmlMessage and Resin knows it from the following binding included in Resin's distribution.
<jsf-taglib xmlns="http://caucho.com/ns/resin">
<uri>http://java.sun.com/jsf/html</uri>
...
<jsf-tag>
<name>messages</name>
<component-class>javax.faces.component.html.HtmlMessages</component-class>
</jsf-tag>
...
</jsf-tablib>
For RichFaces two bindings needed: one for the base Ajax4JSF library and another for RichFaces UI.
Ajax4JSF
<?xml version='1.0'?>
<jsf-taglib xmlns='http://caucho.com/ns/resin'>
<uri>http://richfaces.org/a4j</uri>
<jsf-tag>
<name>actionparam</name>
<component-class>org.ajax4jsf.component.html.HtmlActionParameter</component-class>
</jsf-tag>
<jsf-tag>
<name>commandButton</name>
<component-class>org.ajax4jsf.component.html.HtmlAjaxCommandButton</component-class>
</jsf-tag>
<jsf-tag>
<name>commandLink</name>
<component-class>org.ajax4jsf.component.html.HtmlAjaxCommandLink</component-class>
</jsf-tag>
<jsf-tag>
<name>form</name>
<component-class>org.ajax4jsf.component.html.AjaxForm</component-class>
</jsf-tag>
<jsf-tag>
<name>include</name>
<component-class>org.ajax4jsf.component.html.Include</component-class>
</jsf-tag>
<jsf-tag>
<name>jsFunction</name>
<component-class>org.ajax4jsf.component.html.HtmlAjaxFunction</component-class>
</jsf-tag>
<jsf-tag>
<name>loadBundle</name>
<component-class>org.ajax4jsf.component.html.AjaxLoadBundle</component-class>
</jsf-tag>
<jsf-tag>
<name>loadScript</name>
<component-class>org.ajax4jsf.component.html.HtmlLoadScript</component-class>
</jsf-tag>
<jsf-tag>
<name>loadStyle</name>
<component-class>org.ajax4jsf.component.html.HtmlLoadStyle</component-class>
</jsf-tag>
<jsf-tag>
<name>log</name>
<component-class>org.ajax4jsf.component.html.AjaxLog</component-class>
</jsf-tag>
<jsf-tag>
<name>mediaOutput</name>
<component-class>org.ajax4jsf.component.html.MediaOutput</component-class>
</jsf-tag>
<jsf-tag>
<name>outputPanel</name>
<component-class>org.ajax4jsf.component.html.HtmlAjaxOutputPanel</component-class>
</jsf-tag>
<jsf-tag>
<name>page</name>
<component-class>org.ajax4jsf.component.html.HtmlPage</component-class>
</jsf-tag>
<jsf-tag>
<name>poll</name>
<component-class>org.ajax4jsf.component.html.AjaxPoll</component-class>
</jsf-tag>
<jsf-tag>
<name>portlet</name>
<component-class>org.ajax4jsf.component.html.HtmlPortlet</component-class>
</jsf-tag>
<jsf-tag>
<name>push</name>
<component-class>org.ajax4jsf.component.html.AjaxPush</component-class>
</jsf-tag>
<jsf-tag>
<name>region</name>
<component-class>org.ajax4jsf.component.html.HtmlAjaxRegion</component-class>
</jsf-tag>
<jsf-tag>
<name>repeat</name>
<component-class>org.ajax4jsf.component.html.HtmlAjaxRepeat</component-class>
</jsf-tag>
<jsf-tag>
<name>status</name>
<component-class>org.ajax4jsf.component.html.HtmlAjaxStatus</component-class>
</jsf-tag>
<jsf-tag>
<name>support</name>
<component-class>org.ajax4jsf.component.html.HtmlAjaxSupport</component-class>
</jsf-tag>
</jsf-taglib>
RichFaces
<?xml version='1.0'?>
<jsf-taglib xmlns='http://caucho.com/ns/resin'>
<uri>http://richfaces.org/rich</uri>
<jsf-tag>
<name>calendar</name>
<component-class>org.richfaces.component.html.HtmlCalendar</component-class>
</jsf-tag>
<jsf-tag>
<name>column</name>
<component-class>org.richfaces.component.html.HtmlColumn</component-class>
</jsf-tag>
<jsf-tag>
<name>columnGroup</name>
<component-class>org.richfaces.component.html.HtmlColumnGroup</component-class>
</jsf-tag>
<jsf-tag>
<name>componentControl</name>
<component-class>org.richfaces.component.html.HtmlComponentControl</component-class>
</jsf-tag>
<jsf-tag>
<name>contextMenu</name>
<component-class>org.richfaces.component.html.HtmlContextMenu</component-class>
</jsf-tag>
<jsf-tag>
<name>dataDefinitionList</name>
<component-class>org.richfaces.component.html.HtmlDataDefinitionList</component-class>
</jsf-tag>
<jsf-tag>
<name>dataFilterSlider</name>
<component-class>org.richfaces.component.html.HtmlDataFilterSlider</component-class>
</jsf-tag>
<jsf-tag>
<name>dataGrid</name>
<component-class>org.richfaces.component.html.HtmlDataGrid</component-class>
</jsf-tag>
<jsf-tag>
<name>dataList</name>
<component-class>org.richfaces.component.html.HtmlDataList</component-class>
</jsf-tag>
<jsf-tag>
<name>dataOrderedList</name>
<component-class>org.richfaces.component.html.HtmlDataOrderedList</component-class>
</jsf-tag>
<jsf-tag>
<name>dataTable</name>
<component-class>org.richfaces.component.html.HtmlDataTable</component-class>
</jsf-tag>
<jsf-tag>
<name>datascroller</name>
<component-class>org.richfaces.component.html.HtmlDatascroller</component-class>
</jsf-tag>
<jsf-tag>
<name>dndParam</name>
<component-class>org.richfaces.component.html.HtmlDndParam</component-class>
</jsf-tag>
<jsf-tag>
<name>dragIndicator</name>
<component-class>org.richfaces.component.html.HtmlDragIndicator</component-class>
</jsf-tag>
<jsf-tag>
<name>dragSupport</name>
<component-class>org.richfaces.component.html.HtmlDragSupport</component-class>
</jsf-tag>
<jsf-tag>
<name>dropDownMenu</name>
<component-class>org.richfaces.component.html.HtmlDropDownMenu</component-class>
</jsf-tag>
<jsf-tag>
<name>dropSupport</name>
<component-class>org.richfaces.component.html.HtmlDropSupport</component-class>
</jsf-tag>
<jsf-tag>
<name>effect</name>
<component-class>org.richfaces.component.html.HtmlEffect</component-class>
</jsf-tag>
<jsf-tag>
<name>gmap</name>
<component-class>org.richfaces.component.html.HtmlGmap</component-class>
</jsf-tag>
<jsf-tag>
<name>inputNumberSlider</name>
<component-class>org.richfaces.component.html.HtmlInputNumberSlider</component-class>
</jsf-tag>
<jsf-tag>
<name>inputNumberSpinner</name>
<component-class>org.richfaces.component.html.HtmlInputNumberSpinner</component-class>
</jsf-tag>
<jsf-tag>
<name>insert</name>
<component-class>org.richfaces.ui.component.html.HtmlInsert</component-class>
</jsf-tag>
<jsf-tag>
<name>jQuery</name>
<component-class>org.richfaces.component.html.HtmlJQuery</component-class>
</jsf-tag>
<jsf-tag>
<name>listShuttle</name>
<component-class>org.richfaces.component.html.HtmlListShuttle</component-class>
</jsf-tag>
<jsf-tag>
<name>menuGroup</name>
<component-class>org.richfaces.component.html.HtmlMenuGroup</component-class>
</jsf-tag>
<jsf-tag>
<name>menuItem</name>
<component-class>org.richfaces.component.html.HtmlMenuItem</component-class>
</jsf-tag>
<jsf-tag>
<name>menuSeparator</name>
<component-class>org.richfaces.component.html.HtmlMenuSeparator</component-class>
</jsf-tag>
<jsf-tag>
<name>message</name>
<component-class>org.richfaces.component.html.HtmlRichMessage</component-class>
</jsf-tag>
<jsf-tag>
<name>messages</name>
<component-class>org.richfaces.component.html.HtmlRichMessages</component-class>
</jsf-tag>
<jsf-tag>
<name>modalPanel</name>
<component-class>org.richfaces.component.html.HtmlModalPanel</component-class>
</jsf-tag>
<jsf-tag>
<name>orderingList</name>
<component-class>org.richfaces.component.html.HtmlOrderingList</component-class>
</jsf-tag>
<jsf-tag>
<name>paint2D</name>
<component-class>org.richfaces.component.html.HtmlPaint2D</component-class>
</jsf-tag>
<jsf-tag>
<name>panel</name>
<component-class>org.richfaces.component.html.HtmlPanel</component-class>
</jsf-tag>
<jsf-tag>
<name>panelBar</name>
<component-class>org.richfaces.component.html.HtmlPanelBar</component-class>
</jsf-tag>
<jsf-tag>
<name>panelBarItem</name>
<component-class>org.richfaces.component.html.HtmlPanelBarItem</component-class>
</jsf-tag>
<jsf-tag>
<name>panelMenu</name>
<component-class>org.richfaces.component.html.HtmlPanelMenu</component-class>
</jsf-tag>
<jsf-tag>
<name>panelMenuGroup</name>
<component-class>org.richfaces.component.html.HtmlPanelMenuGroup</component-class>
</jsf-tag>
<jsf-tag>
<name>panelMenuItem</name>
<component-class>org.richfaces.component.html.HtmlPanelMenuItem</component-class>
</jsf-tag>
<jsf-tag>
<name>recursiveTreeNodesAdaptor</name>
<component-class>org.richfaces.component.html.HtmlRecursiveTreeNodesAdaptor</component-class>
</jsf-tag>
<jsf-tag>
<name>scrollableDataTable</name>
<component-class>org.richfaces.component.html.HtmlScrollableDataTable</component-class>
</jsf-tag>
<jsf-tag>
<name>separator</name>
<component-class>org.richfaces.component.html.HtmlSeparator</component-class>
</jsf-tag>
<jsf-tag>
<name>simpleTogglePanel</name>
<component-class>org.richfaces.component.html.HtmlSimpleTogglePanel</component-class>
</jsf-tag>
<jsf-tag>
<name>spacer</name>
<component-class>org.richfaces.component.html.HtmlSpacer</component-class>
</jsf-tag>
<jsf-tag>
<name>subTable</name>
<component-class>org.richfaces.component.html.HtmlSubTable</component-class>
</jsf-tag>
<jsf-tag>
<name>suggestionbox</name>
<component-class>org.richfaces.component.html.HtmlSuggestionBox</component-class>
</jsf-tag>
<jsf-tag>
<name>tab</name>
<component-class>org.richfaces.component.html.HtmlTab</component-class>
</jsf-tag>
<jsf-tag>
<name>tabPanel</name>
<component-class>org.richfaces.component.html.HtmlTabPanel</component-class>
</jsf-tag>
<jsf-tag>
<name>toggleControl</name>
<component-class>org.richfaces.component.html.HtmlToggleControl</component-class>
</jsf-tag>
<jsf-tag>
<name>togglePanel</name>
<component-class>org.richfaces.component.html.HtmlTogglePanel</component-class>
</jsf-tag>
<jsf-tag>
<name>toolBar</name>
<component-class>org.richfaces.component.html.HtmlToolBar</component-class>
</jsf-tag>
<jsf-tag>
<name>toolBarGroup</name>
<component-class>org.richfaces.component.html.HtmlToolBarGroup</component-class>
</jsf-tag>
<jsf-tag>
<name>toolTip</name>
<component-class>org.richfaces.component.html.HtmlToolTip</component-class>
</jsf-tag>
<jsf-tag>
<name>tree</name>
<component-class>org.richfaces.component.html.HtmlTree</component-class>
</jsf-tag>
<jsf-tag>
<name>treeNode</name>
<component-class>org.richfaces.component.html.HtmlTreeNode</component-class>
</jsf-tag>
<jsf-tag>
<name>treeNodesAdaptor</name>
<component-class>org.richfaces.component.html.HtmlTreeNodesAdaptor</component-class>
</jsf-tag>
<jsf-tag>
<name>virtualEarth</name>
<component-class>org.richfaces.component.html.HtmlVirtualEarth</component-class>
</jsf-tag>
</jsf-taglib>
Switching the Fast JSF mode on and off
Fast JSF mode can be turned on globally or for particular context by setting fast-jsf flag to true in $RESIN-HOME/conf/resin.xml or my-app/WEB-INF/resin-web.xml. In Resin 3.2 fast-jsf mode is turned on by default.
Example of $my-app/WEB-INF/resin-web.xml that turns fast JSF mode on
<web-app xmlns='http://caucho.com/ns/resin'>
<jsf fast-jsf='true'/>
</web-app>