Creating RSS feed ?
lcoetzee Oct 27, 2006 8:33 AMHi,
I have been trying to create a rss feed publishing things (new elements) along the line of the example in the jboss-seam blog example. For some very weird reason I am not able to get Seam to inject/unwrap when the rss news feed page is accessed.
my rss page looks something like this(rssNewsFeed.rss):
<rss version="0.91"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
<channel>
<title>This is a RSS feed </title>
<link>http://localhost:8080/portal/public/content/view/viewServicesHome.jsf</link>
<description>This is a description of the rss feed</description>
<language>en</language>
<ui:repeat value="#{rssFeed.entries}" var="content">
<item>
<title>#{content.contentName.name}</title>
<link>http://localhost:8080/portal/public/content/view/viewContent.jsf?selectedContentId=#{content.id}</link>
<description>
<h:outputText value="#{content.contentDescription.description}"/>
</description>
</item>
</ui:repeat>
</channel>
</rss>
with my manager component:
@Name("rssFeed")
@Scope(ScopeType.STATELESS)
public class RSSFeed {
@In(create=true)
RSS rssBean;
private List<Content> entries;
@Unwrap
public RSSFeed listAllNewContent() throws NAPPublicException{
entries = rssBean.listAllNewContent();
return this;
}
public List<Content> getEntries() {
return entries;
}
public void setEntries(List<Content> entries) {
this.entries = entries;
}
}
I am able to subscribe to the rss feed using a normal aggregator, but for some reason when the page is accessed Seam does not intercept and outject/unwrap the RSSFeed component.
Is there something else I must set to get the rss page populated (with the dynamic stuff) when it is accessed ? It is almost as if Seam/tomcat/jboss does not know it has to intercept and do its things when the page is retrieved.
I am sure it is something stupid (it is very similar to the blog example). Any suggestions would be appreciated.
Thanks
Louis