IBM® Extensions to the Dojo Toolkit

Atom library, data store, and widgets

Atom Widgets Reference:


Feed Viewer Widget

A reference widget for a Atom feed viewer implementation, this widget fetches a feed from the given URL and displays, in chronological order, entry titles and updated elements. This widget supports click events to highlight an entry and publishes the selected entry on the given topic.

Widget Variables
String url The URL from which to retrieve the Atom feed
String entrySelectionTopic The topic to both subscribe and publish. This enables two-way communication between the FeedViewer and FeedEntryViewer or FeedEntryEditor widgets.
Boolean localSaveOnly Whether to send updated entries (if using a FeedEntryEditor to display or edit entries) back to the server

Widget Functions
void clear()
Clears all current entries in the feed view
void setFeedFromUrl(String url)
Sets the feed from a URL
void setFeed(ibm_atom.io.atom.Feed feed)
Sets the feed data to be displayed
void appendGrouping(String titleText)
Appends a new grouping of entries with the given title text
void appendEntry(ibm_atom.io.atom.Entry entry)
Appends an entry to the feed view
void onEntrySelected(ibm_atom.io.Entry entry)
Intended as an attach point, this function is called when an entry is selected
void addCategoryIncludeFilter(Object filter)
Adds a filter for entry inclusion into the feed view
void removeCategoryIncludeFilter(Object filter)
Removes a filter for entry inclusion in the feed view
void destroy()
Destroys the widget, including all descendants and subscriptions

Widget Function Details
clear

setFeedFromUrl

setFeed

appendGrouping

appendEntry

onEntrySelected

addCategoryIncludeFilter

removeCategoryIncludeFilter

destroy

Feed Entry Viewer Widget

This widget displays an individual entry elements. A bar is provided at the top with a menu to turn specific elements on or off. The viewable elements can be dictated at creation time. In addition to the functions outlined in the following table, there are several additional functions, used mainly internally, to set the value of various nodes in the page.

Widget Variables
Boolean enableMenu Whether to enable the menu, allowing you to toggle the display of the entry elements.
Boolean enableMenuFade Indicates if a slick-looking fade effect is used for the menu described above.
Boolean enableEdit Indicates whether edit functions are enabled. This flag is only used if using the FeedEntryEditor widget, which extends this widget.
String displayEntrySections The entry elements to display as a comma-separated list. The available sections are title, authors, contributors, summary, content, ID, and updated.
String entrySelectionTopic The topic to both subscribe and publish. This enables two-way communication between the FeedViewer and FeedEntryViewer or FeedEntryEditor widgets.

Widget Functions
void clear()
Clears the full state of this widget, including clearing the specific entry you display and the feed to which it belongs
void clearNodes()
Clears the display nodes of this widget
void setEntry(ibm_atom.io.atom.Entry entry, ibm_atom.io.atom.Feed feed, Boolean leaveMenuState)
Sets the entry that this viewer is displaying

Widget Function Details
clear

clearNodes

setEntry

Feed Entry Editor Widget

This widget displays the elements of an individual as also allows edits to be made on this entry, if the entry has a link with a rel attribute that equals to "edit". This widget does none of the work of sending the edits back as requests. Instead, the widget updates its rendering and sends the updates on the entrySelectionTopic and allows the FeedViewer widget to handle the sending of the data.

As mentioned, this widget extends the FeedEntryEditor widget; therefore all of its variables and functions are inherited. This widget does, however, override the previously mentioned undocumented functions that set the display node values, as it must replace the value with an editor object in the event that this entry is being edited. This widget has no additional variables or functions over the FeedEntryViewer. For the appropriate variables and functions, see here and here, respectively.