added line breaks for sample code that otherwise runs off the end of the page

This commit is contained in:
Scott Andrews
2008-04-12 00:13:26 +00:00
parent 56c0683c3e
commit 6d144bb0f8
8 changed files with 52 additions and 26 deletions

View File

@@ -196,7 +196,8 @@
If the expression returns a value that may need to be converted, specify the desired type using the <code>result-type</code> attribute:
</para>
<programlisting language="xml">
&lt;evaluate expression="bookingService.findHotels(searchCriteria)" result="flowScope.hotels" result-type="dataModel"/&gt;
&lt;evaluate expression="bookingService.findHotels(searchCriteria)" result="flowScope.hotels"
result-type="dataModel"/&gt;
</programlisting>
</sect3>
</sect2>
@@ -214,7 +215,8 @@
&lt;input name="hotelId" /&gt;
&lt;on-start&gt;
&lt;evaluate expression="bookingService.createBooking(hotelId, currentUser.name)" result="flowScope.booking" /&gt;
&lt;evaluate expression="bookingService.createBooking(hotelId, currentUser.name)"
result="flowScope.booking" /&gt;
&lt;/on-start&gt;
&lt;view-state id="enterBookingDetails"&gt;
@@ -339,7 +341,8 @@ public interface FlowOutcome {
&lt;input name="hotelId" /&gt;
&lt;on-start&gt;
&lt;evaluate expression="bookingService.createBooking(hotelId, currentUser.name)" result="flowScope.booking" /&gt;
&lt;evaluate expression="bookingService.createBooking(hotelId, currentUser.name)"
result="flowScope.booking" /&gt;
&lt;/on-start&gt;
&lt;view-state id="enterBookingDetails"&gt;
@@ -449,7 +452,8 @@ public interface FlowOutcome {
&lt;input name="hotelId" /&gt;
&lt;on-start&gt;
&lt;evaluate expression="bookingService.createBooking(hotelId, currentUser.name)" result="flowScope.booking" /&gt;
&lt;evaluate expression="bookingService.createBooking(hotelId, currentUser.name)"
result="flowScope.booking" /&gt;
&lt;/on-start&gt;
&lt;view-state id="enterBookingDetails"&gt;

View File

@@ -123,7 +123,8 @@
</para>
<programlisting type="xml">
&lt;on-render&gt;
&lt;evaluate expression="searchService.findHotels(searchCriteria)" result="viewScope.hotels" type="dataModel" /&gt;
&lt;evaluate expression="searchService.findHotels(searchCriteria)" result="viewScope.hotels"
type="dataModel" /&gt;
&lt;/on-render&gt;
</programlisting>
</sect2>
@@ -182,7 +183,8 @@
Use <code>currentUser</code> to access the authenticated <code>Principal</code>:
</para>
<programlisting type="xml">
&lt;evaluate expression="bookingService.createBooking(hotelId, currentUser.name)" result="flowScope.booking" /&gt;
&lt;evaluate expression="bookingService.createBooking(hotelId, currentUser.name)"
result="flowScope.booking" /&gt;
</programlisting>
</sect2>
<sect2 id="el-variable-messageContext">
@@ -222,7 +224,8 @@
See the <code>ExternalContext</code> API JavaDocs for more information.
</para>
<programlisting type="xml">
&lt;evaluate expression="searchService.suggestHotels(externalContext.sessionMap.userProfile)" result="viewScope.hotels" /&gt;
&lt;evaluate expression="searchService.suggestHotels(externalContext.sessionMap.userProfile)"
result="viewScope.hotels" /&gt;
</programlisting>
</sect2>
</sect1>

View File

@@ -61,7 +61,8 @@
</webflow:flow-execution-listeners>
</webflow:flow-executor>
<bean id="jpaFlowExecutionListener" class="com.bah.tdc.webflow.persistence.JpaFlowExecutionListener">
<bean id="jpaFlowExecutionListener"
class="com.bah.tdc.webflow.persistence.JpaFlowExecutionListener">
<constructor-arg ref="entityManagerFactory" />
<constructor-arg ref="transactionManager" />
</bean>

View File

@@ -138,10 +138,14 @@
&lt;security:authentication-provider&gt;
&lt;security:password-encoder hash="md5" /&gt;
&lt;security:user-service&gt;
&lt;security:user name="keith" password="417c7382b16c395bc25b5da1398cf076" authorities="ROLE_USER,ROLE_SUPERVISOR" /&gt;
&lt;security:user name="erwin" password="12430911a8af075c6f41c6976af22b09" authorities="ROLE_USER,ROLE_SUPERVISOR" /&gt;
&lt;security:user name="jeremy" password="57c6cbff0d421449be820763f03139eb" authorities="ROLE_USER" /&gt;
&lt;security:user name="scott" password="942f2339bf50796de535a384f0d1af3e" authorities="ROLE_USER" /&gt;
&lt;security:user name="keith" password="417c7382b16c395bc25b5da1398cf076"
authorities="ROLE_USER,ROLE_SUPERVISOR" /&gt;
&lt;security:user name="erwin" password="12430911a8af075c6f41c6976af22b09"
authorities="ROLE_USER,ROLE_SUPERVISOR" /&gt;
&lt;security:user name="jeremy" password="57c6cbff0d421449be820763f03139eb"
authorities="ROLE_USER" /&gt;
&lt;security:user name="scott" password="942f2339bf50796de535a384f0d1af3e"
authorities="ROLE_USER" /&gt;
&lt;/security:user-service&gt;
&lt;/security:authentication-provider&gt;
</programlisting>

View File

@@ -108,7 +108,8 @@ public class ViewFlowHandler extends AbstractFlowHandler {
Other modes can be added and point to the same flow as <code>view</code> mode, or any other flow.
</para>
<programlisting language="xml"><![CDATA[
<bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping">
<bean id="portletModeHandlerMapping"
class="org.springframework.web.portlet.handler.PortletModeHandlerMapping">
<property name="portletModeMap">
<map>
<entry key="view">
@@ -126,7 +127,8 @@ public class ViewFlowHandler extends AbstractFlowHandler {
The flow executor is required as a constructor argument.
</para>
<programlisting language="xml"><![CDATA[
<bean id="flowHandlerAdapter" class="org.springframework.webflow.mvc.portlet.FlowHandlerAdapter">
<bean id="flowHandlerAdapter"
class="org.springframework.webflow.mvc.portlet.FlowHandlerAdapter">
<constructor-arg ref="flowExecutor" />
</bean>
]]></programlisting>

View File

@@ -241,7 +241,8 @@
component:
</para>
<programlisting language="xhtml"><![CDATA[
<h:dataTable id="bookings" styleClass="summary" value="#{bookings}" var="booking" rendered="#{bookings.rowCount > 0}">
<h:dataTable id="bookings" styleClass="summary" value="#{bookings}" var="booking"
rendered="#{bookings.rowCount > 0}">
<h:column>
<f:facet name="header">Name</f:facet>
#{booking.hotel.name}
@@ -549,7 +550,8 @@
component:
</para>
<programlisting><![CDATA[
<sf:clientTextValidator required="true" regExp="[0-9]{16}" invalidMessage="A 16-digit credit card number is required.">
<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"/>
</sf:clientTextValidator>]]>
</programlisting>

View File

@@ -214,7 +214,8 @@ java org.springframework.webflow.engine.model.builder.xml.WebFlowUpgrader flowTo
...
</webflow:flow-registry>
<webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="mvcViewFactoryCreator"/>
<webflow:flow-builder-services id="flowBuilderServices"
view-factory-creator="mvcViewFactoryCreator"/>
<bean id="mvcViewFactoryCreator" class="org.springframework.webflow.mvc.MvcViewFactoryCreator">
<property name="viewResolvers" ref="tilesViewResolver"/>

View File

@@ -98,7 +98,8 @@
</para>
<programlisting language="xml">
&lt;on-render&gt;
&lt;evaluate expression="bookingService.findHotels(searchCriteria)" result="viewScope.hotels" result-type="dataModel" /&gt;
&lt;evaluate expression="bookingService.findHotels(searchCriteria)"
result="viewScope.hotels" result-type="dataModel" /&gt;
&lt;/on-render&gt;
</programlisting>
</sect2>
@@ -113,7 +114,8 @@
<programlisting language="xml">
&lt;view-state id="searchResults"&gt;
&lt;on-render&gt;
&lt;evaluate expression="bookingService.findHotels(searchCriteria)" result="viewScope.hotels" result-type="dataModel" /&gt;
&lt;evaluate expression="bookingService.findHotels(searchCriteria)"
result="viewScope.hotels" result-type="dataModel" /&gt;
&lt;/on-render&gt;
&lt;transition on="next"&gt;
&lt;evaluate expression="searchCriteria.nextPage()" /&gt;
@@ -135,7 +137,8 @@
</para>
<programlisting language="xml">
&lt;on-render&gt;
&lt;evaluate expression="bookingService.findHotels(searchCriteria)" result="viewScope.hotels" result-type="dataModel" /&gt;
&lt;evaluate expression="bookingService.findHotels(searchCriteria)"
result="viewScope.hotels" result-type="dataModel" /&gt;
&lt;/on-render&gt;
</programlisting>
</sect1>
@@ -300,9 +303,13 @@ public class BookingValidator {
<programlisting type="java">
MessageContext context = ...
MessageBuilder builder = new MessageBuilder();
context.addMessage(builder.error().source("checkinDate").defaultText("Check in date must be a future date").build());
context.addMessage(builder.warn().source("smoking").defaultText("Smoking is bad for your health").build());
context.addMessage(builder.info().defaultText("We have processed your reservation - thank you and enjoy your stay").build());
context.addMessage(builder.error().source("checkinDate")
.defaultText("Check in date must be a future date").build());
context.addMessage(builder.warn().source("smoking")
.defaultText("Smoking is bad for your health").build());
context.addMessage(builder.info()
.defaultText("We have processed your reservation - thank you and enjoy your stay")
.build());
</programlisting>
</sect2>
<sect2 id="plain-text-message-intl">
@@ -310,9 +317,11 @@ context.addMessage(builder.info().defaultText("We have processed your reservatio
<programlisting type="java">
MessageContext context = ...
MessageBuilder builder = new MessageBuilder();
context.addMessage(builder.error().source("checkinDate").code("checkinDate.notFuture").build());
context.addMessage(builder.warn().source("smoking").code("notHealthy").resolvableArg("smoking").build());
context.addMessage(builder.info().code("reservationConfirmation").build());
context.addMessage(builder.error().source("checkinDate").code("checkinDate.notFuture")
.build());
context.addMessage(builder.warn().source("smoking").code("notHealthy")
.resolvableArg("smoking").build());
context.addMessage(builder.info().code("reservationConfirmation").build());
</programlisting>
</sect2>
<sect2 id="message-bundles">