SeamFramework.orgCommunity Documentation

Chapter 21. RSS support

21.1. Installation
21.2. Generating feeds
21.3. Feeds
21.4. Entries
21.5. Links and further documentation

It is now easy to integrate RSS feeds in Seam through the YARFRAW library. The RSS support is currently in the state of "tech preview" in the current release.

To enable RSS support, include the jboss-seam-rss.jar in your applications WEB-INF/lib directory. The RSS library also has some dependent libraries that should be placed in the same directory. See Section 39.2.6, “Seam RSS support” for a list of libraries to include.

The Seam RSS support requires the use of Facelets as the view technology.

The examples/rss project contains an example of RSS support in action. It demonstrates proper deployment packaging, and it shows the exposed functionality.

A feed is a xhtml-page that consist of a feed and a list of nested entry items.



         
            <r:feed 
               xmlns="http://www.w3.org/1999/xhtml" 
               xmlns:ui="http://java.sun.com/jsf/facelets" 
               xmlns:r="http://jboss.org/schema/seam/rss"
               title="#{rss.feed.title}"
               uid="#{rss.feed.uid}"
               subtitle="#{rss.feed.subtitle}"
               updated="#{rss.feed.updated}"
               link="#{rss.feed.link}">
               <ui:repeat value="#{rss.feed.entries}" var="entry">
                  <r:entry
                     uid="#{entry.uid}"
                     title="#{entry.title}"
                     link="#{entry.link}"
                     author="#{entry.author}"
                     summary="#{entry.summary}"
                     published="#{entry.published}"
                     updated="#{entry.updated}"
                  />
               </ui:repeat>
            </r:feed>
        
      

Feeds are the top-level entities that describe the properties of the information source. It contains zero or more nested entries.

<r:feed>

Attributes

  • uid — An optional unique feed id. The value is a string.

  • title — The title of the feed. The value is a string.

  • subtitle — The subtitle of the feed. The value is a string.

  • updated — When was the feed updated? The value is a date.

  • link — The link to the source of the information. The value is a string.

  • feedFormat — The feed format. The value is a string and defaults to ATOM1. Valid values are RSS10, RSS20, ATOM03 and ATOM10.

Child elements

  • Zero or more feed entries

Facets

  • none

Entries are the "headlines" in the feed.

<r:feed>

Attributes

  • uid — An optional unique entry id. The value is a string.

  • title — The title of the entry. The value is a string.

  • link — A link to the item. The value is a string.

  • author — The author of the story. The value is a string.

  • summary — The body of the story. The value is a string.

  • textFormat — The format of the body and title of the story. The value is a string and valid values are "text" and "html". Defaults to "html".

  • published — When was the story first published? The value is a date.

  • updated — When was the story updated? The value is a date.

Child elements

  • none

Facets

  • none

The core of the RSs functionality is based on the YARFRAW library which can be found on http://yarfraw.sourceforge.net/ and most features and possible limitations are inherited from here.

For details on the ATOM 1.0 format, have a look at the specs

For details on the RSS 2.0 format, have a look at the specs