Moved JSF configurations into a separate config file so if you don't use / have JSF libraries it won't break

git-svn-id: https://svn.apache.org/repos/asf/struts/action2/trunk@410002 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason Carreira
2006-05-28 22:59:31 +00:00
parent b57be5495d
commit 668889190e
3 changed files with 32 additions and 21 deletions
@@ -1,8 +1,9 @@
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.1.1//EN" "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd">
<xwork>
<include file="struts-default.xml"/>
<include file="struts-jsf.xml"/>
<package name="jsf" extends="struts-default" namespace="/jsf">
<package name="jsf" extends="struts-default, struts-jsf" namespace="/jsf">
<action name="index" class="org.apache.struts.action2.showcase.jsf.IndexAction">
<interceptor-ref name="jsfStack"/>
+1 -20
View File
@@ -13,8 +13,7 @@
<result-type name="velocity" class="org.apache.struts.action2.dispatcher.VelocityResult"/>
<result-type name="xslt" class="org.apache.struts.action2.views.xslt.XSLTResult"/>
<result-type name="plaintext" class="org.apache.struts.action2.dispatcher.PlainTextResult" />
<result-type name="jsf" class="org.apache.struts.action2.jsf.FacesResult" />
<!-- third party integration -->
<result-type name="jasper" class="org.apache.struts.action2.views.jasperreports.JasperReportsResult"/>
</result-types>
@@ -46,14 +45,6 @@
<interceptor name="validation" class="com.opensymphony.xwork.validator.ValidationInterceptor"/>
<interceptor name="workflow" class="com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor"/>
<!-- JSF interceptors, one per lifecycle phase -->
<interceptor class="org.apache.struts.action2.jsf.FacesSetupInterceptor" name="jsfSetup" />
<interceptor class="org.apache.struts.action2.jsf.RestoreViewInterceptor" name="jsfRestore" />
<interceptor class="org.apache.struts.action2.jsf.ApplyRequestValuesInterceptor" name="jsfApply" />
<interceptor class="org.apache.struts.action2.jsf.ProcessValidationsInterceptor" name="jsfValidate" />
<interceptor class="org.apache.struts.action2.jsf.UpdateModelValuesInterceptor" name="jsfUpdate" />
<interceptor class="org.apache.struts.action2.jsf.InvokeApplicationInterceptor" name="jsfInvoke" />
<!-- Basic stack -->
<interceptor-stack name="basicStack">
<interceptor-ref name="exception"/>
@@ -185,16 +176,6 @@
<interceptor-ref name="execAndWait">
<param name="excludeMethods">input,back,cancel</param>
</interceptor-ref>
</interceptor-stack>
<!-- Sample JSF stack, can be combined with other stacks easily -->
<interceptor-stack name="jsfStack">
<interceptor-ref name="jsfSetup" />
<interceptor-ref name="jsfRestore" />
<interceptor-ref name="jsfApply" />
<interceptor-ref name="jsfValidate" />
<interceptor-ref name="jsfUpdate" />
<interceptor-ref name="jsfInvoke" />
</interceptor-stack>
</interceptors>
+29
View File
@@ -0,0 +1,29 @@
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.1.1//EN" "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd">
<xwork>
<package name="struts-jsf">
<result-types>
<result-type name="jsf" class="org.apache.struts.action2.jsf.FacesResult" />
</result-types>
<interceptors>
<!-- JSF interceptors, one per lifecycle phase -->
<interceptor class="org.apache.struts.action2.jsf.FacesSetupInterceptor" name="jsfSetup" />
<interceptor class="org.apache.struts.action2.jsf.RestoreViewInterceptor" name="jsfRestore" />
<interceptor class="org.apache.struts.action2.jsf.ApplyRequestValuesInterceptor" name="jsfApply" />
<interceptor class="org.apache.struts.action2.jsf.ProcessValidationsInterceptor" name="jsfValidate" />
<interceptor class="org.apache.struts.action2.jsf.UpdateModelValuesInterceptor" name="jsfUpdate" />
<interceptor class="org.apache.struts.action2.jsf.InvokeApplicationInterceptor" name="jsfInvoke" />
<!-- Sample JSF stack, can be combined with other stacks easily -->
<interceptor-stack name="jsfStack">
<interceptor-ref name="jsfSetup" />
<interceptor-ref name="jsfRestore" />
<interceptor-ref name="jsfApply" />
<interceptor-ref name="jsfValidate" />
<interceptor-ref name="jsfUpdate" />
<interceptor-ref name="jsfInvoke" />
</interceptor-stack>
</interceptors>
</package>
</xwork>