formatting

This commit is contained in:
Keith Donald
2008-06-06 04:18:06 +00:00
parent 71706605f7
commit 62818bfebf
4 changed files with 53 additions and 53 deletions

View File

@@ -123,15 +123,10 @@
</para>
<programlisting language="xml"><![CDATA[
<security:http auto-config="true">
<security:intercept-url pattern="/spring/login*" access="ROLE_ANONYMOUS" />
<security:intercept-url pattern="/spring/logout-success*" access="ROLE_ANONYMOUS" />
<security:intercept-url pattern="/spring/logout*" access="ROLE_USER" />
<security:form-login login-page="/spring/login"
login-processing-url="/spring/loginProcess"
default-target-url="/spring/main"
authentication-failure-url="/spring/login?login_error=1" />
authentication-failure-url="/spring/login?login_error=1" />
<security:logout logout-url="/spring/logout" logout-success-url="/spring/logout-success" />
</security:http>

View File

@@ -68,7 +68,7 @@
<para>
To access jars using Maven, add the following repositories to your Maven pom:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<repository>
<id>com.springsource.repository.bundles.release</id>
<name>SpringSource Enterprise Bundle Repository - SpringSource Releases</name>
@@ -84,34 +84,34 @@
<para>
Then declare the following dependencies:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>org.springframework.binding</artifactId>
<version>2.0.0.RELEASE</version>
<version>2.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>org.springframework.js</artifactId>
<version>2.0.0.RELEASE</version>
<version>2.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>org.springframework.webflow</artifactId>
<version>2.0.0.RELEASE</version>
<version>2.0.2.RELEASE</version>
</dependency>
]]>
</programlisting>
<para>
And if using JavaServerFaces:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>org.springframework.faces</artifactId>
<version>2.0.0.RELEASE</version>
<version>2.0.2.RELEASE</version>
</dependency>
]]>
</programlisting>
@@ -121,7 +121,7 @@
<para>
To access jars using Ivy, add the following repositories to your Ivy config:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<url name="com.springsource.repository.bundles.release">
<ivy pattern="http://repository.springsource.com/ivy/bundles/release/
[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
@@ -139,21 +139,21 @@
<para>
Then declare the following dependencies:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<dependency org="org.springframework.webflow" name="org.springframework.binding"
rev="2.0.0.RELEASE" conf="compile->compile" />
rev="2.0.2.RELEASE" conf="compile->runtime" />
<dependency org="org.springframework.webflow" name="org.springframework.js"
rev="2.0.0.RELEASE" conf="compile->compile" />
rev="2.0.2.RELEASE" conf="compile->runtime" />
<dependency org="org.springframework.webflow" name="org.springframework.webflow"
rev="2.0.0.RELEASE" conf="compile->compile" />
rev="2.0.2.RELEASE" conf="compile->runtime" />
]]>
</programlisting>
<para>
And if using JavaServerFaces:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<dependency org="org.springframework.webflow" name="org.springframework.faces"
rev="2.0.0.RELEASE" conf="compile->compile" />
rev="2.0.2.RELEASE" conf="compile->runtime" />
]]>
</programlisting>
</sect2>
@@ -168,34 +168,34 @@
<para>
To access Web Flow jars from Maven Central, declare the following dependencies in you pom:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>org.springframework.binding</artifactId>
<version>2.0.0.RELEASE</version>
<version>2.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>org.springframework.js</artifactId>
<version>2.0.0.RELEASE</version>
<version>2.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>org.springframework.webflow</artifactId>
<version>2.0.0.RELEASE</version>
<version>2.0.2.RELEASE</version>
</dependency>
]]>
</programlisting>
<para>
And if using JavaServerFaces:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>org.springframework.faces</artifactId>
<version>2.0.0.RELEASE</version>
<version>2.0.2.RELEASE</version>
</dependency>
]]>
</programlisting>

View File

@@ -13,7 +13,6 @@
integrates Dojo as the underlying UI toolkit.
</para>
</sect1>
<sect1 id="spring-faces-integration">
<title>Spring-centric Integration Approach</title>
<para>
@@ -103,7 +102,7 @@
so that CSS and JavaScript resources may be output correctly by the components. This servlet must be mapped
to /resources/* in order for the URL's rendered by the components to function correctly.
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<!-- Serves static resource content from .jar files such as spring-faces.jar -->
<servlet>
<servlet-name>Resource Servlet</servlet-name>
@@ -121,7 +120,7 @@
The Spring Faces components require the use of Facelets instead of JSP, so the typical Facelets
configuration must be added as well when using these components.
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
!-- Use JSF view templates saved as *.xhtml, for use with Facelets -->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
@@ -139,7 +138,7 @@
<code>flow-builder-services</code>
:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -167,7 +166,13 @@
</beans>]]>
</programlisting>
<para>See the booking-faces reference application in the distribution for a complete working example.</para>
<para>
The <code>faces:flow-builder-services</code> tag also several other defaults appropriate for a JSF environment.
Specifically, the Unified EL is configured as the default Expression Language.
</para>
<para>
See the swf-booking-faces reference application in the distribution for a complete working example.
</para>
</sect1>
<sect1 id="spring-faces-config">
<title>Configuring faces-config.xml</title>
@@ -178,7 +183,7 @@
not need to add anything specific to Spring Faces to your
<code>faces-config.xml</code>
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<faces-config>
<application>
<!-- Enables Facelets -->
@@ -536,7 +541,7 @@
<code>view-state</code>
.
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<view-state id="changeSearchCriteria" view="enterSearchCriteria.xhtml" popup="true">
<on-entry>
<render fragments="hotelSearchFragment" />
@@ -571,7 +576,7 @@
<code>clientTextValidator</code>
component:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<sf:clientTextValidator required="true">
<h:inputText id="creditCardName" value="#{booking.creditCardName}" required="true"/>
</sf:clientTextValidator>]]>
@@ -589,7 +594,7 @@
<code>clientNumberValidator</code>
component:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<sf:clientTextValidator required="true" regExp="[0-9]{16}"
invalidMessage="A 16-digit credit card number is required.">
<h:inputText id="creditCard" value="#{booking.creditCard}" required="true"/>
@@ -609,7 +614,7 @@
<code>clientDateValidator</code>
component:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<sf:clientDateValidator required="true" >
<h:inputText id="checkinDate" value="#{booking.checkinDate}" required="true">
<f:convertDateTime pattern="yyyy-MM-dd" timeZone="EST"/>
@@ -630,7 +635,7 @@
component can be used to intercept the "onclick" event of a child component and suppress the event if
all client-side validations do not pass.
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<sf:validateAllOnClick>
<sf:commandButton id="proceed" action="proceed" processIds="*" value="Proceed"/>&#160;
</sf:validateAllOnClick>]]>
@@ -660,7 +665,7 @@
To use the Rich Faces component library with Spring Faces, the following filter configuration is needed
in web.xml (in addition to the typical Spring Faces configuration):
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
@@ -679,7 +684,7 @@
For deeper integration (including the ability to have a view with combined use of the Spring Faces Ajax
components and Rich Faces Ajax components), configure the RichFacesAjaxHandler on your FlowController:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
<property name="flowExecutor" ref="flowExecutor" />
<property name="ajaxHandler">
@@ -698,7 +703,7 @@
EL variable. For example, in your view template you can have a fragment that you would potentially like
to re-render in response to a particular event:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<h:form id="hotels">
<a4j:outputPanel id="searchResultsFragment">
<h:outputText id="noHotelsText" value="No Hotels Found" rendered="#{hotels.rowCount == 0}"/>
@@ -720,7 +725,7 @@
<code>commandLink</code>
to fire the event:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<a4j:commandLink id="nextPageLink" value="More Results" action="next" reRender="#{flowRenderFragments}" />]]>
</programlisting>
<para>
@@ -728,7 +733,7 @@
<code>transition</code>
to handle the event:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<transition on="next">
<evaluate expression="searchCriteria.nextPage()" />
<render fragments="hotels:searchResultsFragment" />
@@ -747,7 +752,7 @@
Typical Trinidad + Spring Faces configuration is as follows in web.xml (in addition to the typical
Spring Faces configuration):
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
@@ -794,4 +799,4 @@
</programlisting>
</sect2>
</sect1>
</chapter>
</chapter>

View File

@@ -19,7 +19,7 @@
This servlet provides a convenient way to serve Spring.js files to your pages.
To deploy this servlet, declare the following in <code>web.xml</code>:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<!-- Serves static resource content from .jar files such as spring-js.jar -->
<servlet>
<servlet-name>Resource Servlet</servlet-name>
@@ -53,7 +53,7 @@
When using the widget system of an underlying library, typically you must also include some CSS resources to obtain the desired look and feel.
For the booking-mvc reference application, Dojo's <code>tundra.css</code> is included:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<link type="text/css" rel="stylesheet" href="<c:url value="/resources/dijit/themes/tundra/tundra.css" />" />]]>
</programlisting>
</sect1>
@@ -67,7 +67,7 @@
<para>
The following example illustrates enhancing a Spring MVC <code>&lt;form:input&gt;</code> tag with rich suggestion behavior:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<form:input id="searchString" path="searchString"/>
<script type="text/javascript">
Spring.addDecoration(new Spring.ElementDecoration({
@@ -86,7 +86,7 @@
When using the <code>ElementDecoration</code> to apply widgets that have rich validation behavior, a common need is to prevent the form from being submitted to the server until validation passes.
This can be done with the <code>ValidateAllDecoration</code>:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<input type="submit" id="proceed" name="_eventId_proceed" value="Proceed" />
<script type="text/javascript">
Spring.addDecoration(new Spring.ValidateAllDecoration({ elementId:'proceed', event:'onclick' }));
@@ -98,7 +98,7 @@
<para>
An <code>AjaxEventDecoration</code> applies a client-side event listener that fires a remote Ajax request to the server. It also auto-registers a callback function to link in the response:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<a id="prevResultsLink" href="search?searchString=${searchCriteria.searchString}&page=${searchCriteria.page - 1}">Previous Results</a>
<script type="text/javascript">
Spring.addDecoration(new Spring.AjaxEventDecoration({
@@ -117,7 +117,7 @@
Sometimes it is necessary to call Spring Javascript's <code>RemotingHandler</code> directly instead of using the <code>AjaxEventDecoration</code>.
For example, see inline <code>onclick</code> handler of this button:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<input type="submit" id="proceed" name="_eventId_proceed" value="Proceed"
onclick="Spring.remoting.submitForm('proceed', 'booking', { fragments:'messages,bookingForm' }); return false;" />
<script type="text/javascript">
@@ -151,7 +151,7 @@
the provided Spring MVC extensions in your Spring application context for rendering the partial response
(note that these extensions require the use of Tiles for templating):
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<bean id="tilesViewResolver" class="org.springframework.js.ajax.AjaxUrlBasedViewResolver">
<property name="viewClass" value="org.springframework.webflow.mvc.view.FlowAjaxTilesView"/>
</bean>]]>
@@ -161,7 +161,7 @@
Note that <code>FlowAjaxTilesView</code> is capable of handling the rendering for both Web Flow and pure Spring MVC requests.
The fragments correspond to individual attributes of a Tiles view definition. For example, take the following Tiles view definition:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<definition name="hotels/index" extends="standardLayout">
<put-attribute name="body" value="index.body" />
</definition>
@@ -183,7 +183,7 @@
currently must be with the pure Spring MVC controller approach.
For example, if you wanted to render the "hotelSearchForm" fragment from the previous example Tiles view into a rich Javascript popup:
</para>
<programlisting><![CDATA[
<programlisting language="xml"><![CDATA[
<view-state id="changeSearchCriteria" view="enterSearchCriteria.xhtml" popup="true">
<on-entry>
<render fragments="hotelSearchForm" />