Skip to content

Instantly share code, notes, and snippets.

@headius
Created December 8, 2008 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/33624 to your computer and use it in GitHub Desktop.
Save headius/33624 to your computer and use it in GitHub Desktop.
class FeedReaderView < ApplicationView
import javax.swing.DefaultListModel
set_java_class 'org.feedmonkey.FeedReader'
map :model => :my_feed_url, :view => "feed_url.text"
map :model => :my_entry_list, :view => "entry_list.model",
:using => [:new_list_model, nil]
def new_list_model(new_list)
new_model = DefaultListModel.new
new_list.each {|element| new_model.add_element element}
new_model
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment