roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave <snoopd...@gmail.com>
Subject Re: Open comments of a post in a popup window
Date Tue, 04 Sep 2007 14:47:20 GMT
On 9/4/07, Wladimir Boton <wboton@gmail.com> wrote:
> Thank you Richard,
> but I didn't undestand why is this different from creating a getEntry method
> as Dave suggested?

Get entry is definitely not the only way to do it and Richard's
technique may work perfectly for you.

If you want to finish what I suggested and if you're OK with making a
code change, you can add the getWeblogEntry() to the PageModel class
yourself:

   /**
     * Get weblog entry specified by anchor or null if no such entry exists.
     * @param anchor Weblog entry anchor
     * @return Weblog entry specified by anchor
     * @roller.wrapPojoMethod type="simple"
     */
    public WeblogEntryData getWeblogEntry(String anchor) {
        WeblogEntryData entry = null;
        try {
            Roller roller = RollerFactory.getRoller();
            WeblogManager wmgr = roller.getWeblogManager();
            entry = wmgr.getWeblogEntryByAnchor(this, anchor);
        } catch (RollerException e) {
            this.log.error("ERROR: getting entry by anchor");
        }
        return entry;
    }

Then you'll want to do a full rebuild to regenerate the POJO wrappers
'ant rebuild'

- Dave

Mime
View raw message