Expert Spring MVC and Web Flow
#springBind("command.firstName") <input type="text" name="$status.expression" value="$!status.value" /><br> #foreach ...
Table 8-2. Te mplate Macros Available for Velocity and FreeMarker Macro Description Velocity FreeMarker bind #springBind($path) ...
Table 8-2. Continued Macro Description Velocity FreeMarker formRadioButtons #springFormRadioButtons($path $options $separator $a ...
Listing 8-25.Example of the #formInput Macro Depart From: #springFormInput("searchFlights.departFrom" "") Depart On: #springFor ...
In Listing 8-27 we show an example Controllerthat puts options for the grouped form input fields into a Mapnamed options. Listin ...
<input type="checkbox" name="city" value="NYC" New York City <input type="checkbox" name="city" value="PAR" Paris ■Tip ...
ResourceBundleViewResolver. You can also set these attributes on VelocityViewResolverto make them available to all of your Veloc ...
Figure 8-6.Locale-aware formatting, this time in French Additional Velocity Views A final note on Velocity support: There are tw ...
In the next section we’ll see how Spring enables seamless integration with another well- known presentation technology: XSLT. XM ...
Listing 8-33 shows the definition of the HomePageclass that is our XSLT View. We’re gener- ating the XML representation manually ...
Element costEl = doc.createElement("cost"); costEl.appendChild( doc.createTextNode(String.valueOf(deal.getCost()))); dealEl.appe ...
Moscow 100 The name of the root element () was in this case set by the Controllerwhen it returned a single object as the model ...
Returning XML in the Raw An interesting use case for the XSLT Viewis actually to avoid transforming the XML at all and simply re ...
Number and Date Formatting Unlike JSTL, Velocity, FreeMarker, and many other templating or web technologies, XSLT (to ver- sion ...
We’ve outlined the behavior of AbstractXsltView, shown how to extend this class to pro- vide your own concrete implementations, ...
Configuring the Application to Use a PDF View The last part of the setup involves simply telling Spring that you want to use you ...
Excel Spring supports two libraries for generating Excel spreadsheets as views: the Jakarta POI library and JExcel. Both are use ...
Coding the View Listing 8-41 shows the class com.apress.expertspringmvc.flight.web.view.HomePageExcel, which extends AbstractExc ...
Configuring the Application Lastly, it just remains to configure the Viewfor use. In our views.propertiesfile we need two entrie ...
Spring’s Jasper support consists of five concrete Viewimplementations for each of the final output types available. These were s ...
«
9
10
11
12
13
14
15
16
17
18
»
Free download pdf