On 9/4/07, Wladimir Boton <[EMAIL PROTECTED]> 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

Reply via email to