How to Start a Software Company 2.0

by Richard Rodger

       
 
More Entries in the Edit Sidebar

Roller shows a list of recent entries and recent drafts on the left sidebar of the weblog editor page. This is a really handy little feature and lets you access entries and drafts really quickly. The problem is that only 20 entries are shown as standard, and there's no setting to change this. Back to the code!

So the sidebar template is in weblog/WeblogEditSidebar.jsp, surprisingly. A quick scan of the code reveals that the list of recent entries is predefined by the model:

<c:forEach var="post" items="${model.recentPublishedEntries}">

Looking at the top of that page, we see that the model is org.roller.presentation.
weblog.actions.WeblogEntryPageModel
. That's kind of a deep package structure, but OK. So inside that class, we hack up the getRecentPublishedEntries method. It's actually just a parameter change:

    public List getRecentPublishedEntries() throws RollerException
    {
        return rollerRequest.getRoller().getWeblogManager()
            .getWeblogEntries(
                rollerRequest.getWebsite(), // userName
                null,              // startDate
                null,              // endDate
                null,              // catName
                WeblogManager.PUB_ONLY, // status
                new Integer(20));  // maxEntries
    }

Change the maxEntries parameter to however many you want and away you go.

Now to deploy. Just run the wonderful build.sh all command from the Roller source root folder and it does most of the work. Copy across the new rollerweb.jar file and restart tomcat. And you're done.

And yes, before you point it out, I am aware that the Roller source does not meet my exacting standards of indentation. The fallback strategy is to stick with whatever dumbass indentation standard the codebase you have to work on uses. That's just the way it is.

@ 10:20 PM GMT+00:00 [ comments [0] ]   email this   links to this

If you liked this entry, please consider bookmarking it &mdash Thanks!
Bookmark More Entries in the Edit Sidebar at del.icio.us Digg More Entries in the Edit Sidebar at Digg.com Bookmark More Entries in the Edit Sidebar at reddit.com Bookmark More Entries in the Edit Sidebar at YahooMyWeb Bookmark More Entries in the Edit Sidebar at Spurl.net Bookmark More Entries in the Edit Sidebar at Simpy.com Bookmark Polyphasic Mutants at NewsVine Blink this More Entries in the Edit Sidebar at blinklist.com Bookmark More Entries in the Edit Sidebar at Furl.net Fark More Entries in the Edit Sidebar at Fark.com

 
 
Trackback URL: http://old.richardrodger.com/roller/trackback/richard/Weblog/more_entries_in_the_edit
Comments:

Comments for this have been disabled. Please send me a mail if you want to comment and I will activate comments again.
 
YahooBloglines
NewsgatorMSN
Google Readerdel.icio.us FurlSubscribe with myFeedster
« December 2005 »
SunMonTueWedThuFriSat
    
3
5
10
11
13
17
18
24
25
26
27
28
29
30
31
       
Today

All | General | Java | Business | Fun | Perl | Rant | Ireland | Web
[This is a Roller site]
[Valid Atom 1.0] [Valid RSS]
Technology Blog Top Sites
Blogarama - The Blogs Directory

Blog Directory & Search engine

Blog Flux Directory
Irish Blogs
 View My Public Stats on MyBlogLog.com

Performancing
Enter your Email


Powered by FeedBlitz
Theme adapted from Sotto.
 
Ricebridge XML Manager
  • Convert XML to a table of data
  • Convert XML to CSV, and CSV to XML
  • High-speed, single-pass XPath
  • Memory-stable and fault-tolerant
  • Loads of documentation
  • Cut-and-paste code examples
  • Find a bug, get a gift cert
Ricebridge Java XML Manager Component


Ricebridge CSV Manager
  • Convert CSV to a table of data
  • Handle any type of delimited file
  • Memory-stable and fault-tolerant
  • Loads of documentation
  • Cut-and-paste code examples
  • Find a bug, get a gift cert
Ricebridge Java CSV Manager Component


Popular Posts

 Sign up for MyBlogLog.com
Alertra Website Monitoring Service
Get Chitika eMiniMalls
Solo Tees
BlogJet