facelets
xmlns:rss4jsf="http://hexiao.cn/rss4jsf"
jsp
<%@ taglib uri="http://www.hexiao.cn/rss4jsf" prefix="rss4jsf" %>
usage
<rss4jsf:simpleRssOutput
url="my.rss"
count="5"
channelVar="channel"
itemVar="item"
>
<f:facet name="header">
<div class="header">
<h2>#{channel.name}</h2>
<p>#{channel.numberOfItems} items. <a href="#{channel.siteUrl}">View Site</a>.</p>
</div>
</f:facet>
<f:facet name="item">
<div class="item">
<h3><a href="#{item.url}">#{item.title}</a></h3>
<p>#{item.author} - #{item.body }</p>
</div>
</f:facet>
</rss4jsf:simpleRssOutput>
Thanks!
The component looks great!
Do you know any component for generating the RSS Feed instead of consuming/reading the RSS Feed ?
Thanks, Yara
I tried it with JSF 1.2 and Netbeans 6 and I got an error for attributes channelVar and itemVar "Unable to find setter method for attribute: channeVar".
But when I follow the sample code at http://bingyu1108.googlepages.com/rss4jsf without setting channelVar and itemVar, it doesn't show anything from the consumed RSS feed.
Any idea of what might be wrong ?
Thanks, Yara
Thank you very much, The component is perfect. Just needed something to wear with facelets. =)
I just checked out its tld, in tld attribute used channeVar, so we need to use channeVar except channelVar, BUT in Java code, I believe coder using channelVar for setter/getter. Thats why I got error that getter setter not found for channelVar. So.....
hi.. how do you solve the error? regarding the attribute channelVar..
Nice component.
I have made a small modification on my local sources. I have add a method in RssItem?.java to format the body. I explain...
Some rss feed comes with HTML tag inside. Sometimes it's not desired. The added method simply remove all HTML tags found. If you need these 3 lines of code :)
Another question, but about Rsslib4JSF. I have a problem if i use your tag on a server who's behind a reverse proxy. I have an RSSException from SimpleRssOutput?.java, line 36, because of a connection refused. It seems to come from the "setXmlResource" method, called from the "parseXmlFile" of the RSSParser class. If you have any idea.
In all case, thanks for your work.
David Johannot
Hello, I have not use rss4jsf, and just do <?xml version='1.0' encoding='UTF-8' ?> <rss xmlns:media="http://search.yahoo.com/mrss/" version="2.0"
</rss> result you can see in the site lastpubs.com http://lastpubs.com/rss.jsf