This example shows a very basic RSS reader.
Click here to view the demo.
Click here for the source code.
I developed this example on a plane, while looking at the gwt samples. It is by no means a glossy demo, and it is not intended to be a glossy demo. Also, it is not the best example of Java code. Instead of spending my time in cleaning the code, I prefer to share it in an early stage.
The server-side is implemented in com.lodgon.ajax.demo1.server.BlogServiceImpl and it will fetch one specific Atom feed: http://i-wisdom.typepad.com/iwisdom/atom.xml (a blog from i-Merge. Of course, this can be enhanced in a way that the user at the client-side defines which feeds to parse, but again, this is just a very basic example.
com.lodgon.ajax.demo1.server.BlogServiceImpl implements com.lodgon.ajax.demo1.client.BlogService which contains two methods:
public String[] getCategories (int i); public Entry[] getEntries (int i);The i-wisdom feed contains entries with categories (tags, keywords). With the getCategories() method (ooh, the int parameter is not used anymore), all keywords in the feed are retrieved. The second method, getEntries() (again, the int parameter is not used anymore, it was just a test in passing arguments to the servlet) retrieves all entries in the feed.
At the client-side, the start-class is com.lodgon.ajax.demo1.client.LodgonDemo. Three Widgets are constructed here, and linked with each other by passing this. The CategoryWidget contains a list of checkboxes that can be toggled in order to specify which keywords should be taken into account when showing postings in the PostingsWidget. Clicking on a title in the PostingsWidget visualizes the entry in the ContentWidget.
Comments? I would love to get feedback: johan at lodgon.com