HTML and CSS Reference
In-Depth Information
<ui:define name="content">
#{bundle['application.welcome']}, #{appUser.firstName} #{appUser.lastName}! <br/><br/>
#{bundle['application.weatherpage.currentInfo']} for #{appUser.zipCode}:
<mashup:yahooWeather temperatureType="c" locationCode="#{appUser.zipCode}"/> <br/><br/>
<h:commandLink value="#{bundle['application.weatherpage.logout']}"
action="#{weatherBacking.logout}"></h:commandLink> <br/><br/>
The weather page displays a welcome message to the user and the Yahoo! weather information is retrieved using
the yahooWeather component of Mashups4JSF library ( ) .
Mashups4JsF is an open-source project that aims at integrating Mashup services with Javaserver Faces
applications. Using Mashups4JsF, JsF developers will be able to construct rich and customized mashups by using
simple tags. Mashups4JsF also allows exporting the Java enterprise application data as Mashup feeds by annotating
the application domain classes with @Feed annotation. For more information check the project home page: .
yahooWeather component gives you the ability to view the current weather status in a specific location in the
world (using Yahoo! Weather Service under the hood) using its ZIP code. It has two main attributes as shown in
Table 10-1 .
Table 10-1. Mashups4JSF yahooWeather Component
Component Attribute
The ZIP code of the location
The temperature in Fahrenheit ( f ) or Celsius ( c ). Default is c .
In order to configure Mashups4JSF in our JSF application, we need to add two jars to the lib folder of your web
Mashups4JSF 1.0.0 core jar.
If our application is a Maven application, we need to add these jars to our application's pom.xml as shown
in Listing 10-5.
Rome 0.9 jar.
Search WWH ::

Custom Search