You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Odelya YomTov-Glick <od...@jpost.com> on 2008/04/28 18:02:44 UTC
ambiguousness in getMostCommentedWeblogEntries
Hi,
When I try to use the method as Dave wrote to me like this:
#set ($theEntries = $site.getMostCommentedWeblogEntries(20, 100))
#foreach($entryStatCount in $theEntries)
$entryStatCount.subjectNameLong
$entryStatCount.subjectNameShort
#end
Nothing returns.
I looked in the source code, and saw that actually WeblogManager expects to
use the method with different parameters!
**
* Get weblog enties ordered by descending number of comments.
* @param website Weblog or null to get for all weblogs.
* @param startDate Start date or null for no start date.
* @param endDate End date or null for no end date.
* @param offset Offset into results for paging
* @param length Max comments to return (or -1 for no limit)
* @returns List of WeblogEntryData objects.
*/
public List getMostCommentedWeblogEntries(
Weblog website,
Date startDate,
Date endDate,
int offset,
int length)
throws WebloggerException;
what's the right way to use it?
Thanks
Odelya YomTov - Glick
RE: ambiguousness in getMostCommentedWeblogEntries
Posted by Odelya YomTov-Glick <od...@jpost.com>.
Hey I found the problem. The first parameter has to be send with the value
null.
For example:
#set ($theEntries = $site.getMostCommentedWeblogEntries(null,10,3))
-----Original Message-----
From: Odelya YomTov-Glick [mailto:odelya@jpost.com]
Sent: Tuesday, April 29, 2008 9:05 AM
To: user@roller.apache.org
Subject: RE: ambiguousness in getMostCommentedWeblogEntries
Hi Allen, thanks for the answer. I still don't get results for the
$theEntries object.
When I try to print it, I get: $theEntries.size() instead of 100.
What could be the problem?
-----Original Message-----
From: Allen.Gilliland@Sun.COM [mailto:Allen.Gilliland@Sun.COM]
Sent: Monday, April 28, 2008 11:42 PM
To: user@roller.apache.org
Subject: Re: ambiguousness in getMostCommentedWeblogEntries
templates don't actually have the ability to directly call into the
backend manager classes, instead the calls first go through a model
class. you need to be looking for that method in the SiteModel class,
that will show you what is happening when you make the call in your
template.
-- Allen
Odelya YomTov-Glick wrote:
> Hi,
> When I try to use the method as Dave wrote to me like this:
> #set ($theEntries = $site.getMostCommentedWeblogEntries(20, 100))
> #foreach($entryStatCount in $theEntries)
> $entryStatCount.subjectNameLong
> $entryStatCount.subjectNameShort
> #end
> Nothing returns.
>
> I looked in the source code, and saw that actually WeblogManager expects
to
> use the method with different parameters!
> **
> * Get weblog enties ordered by descending number of comments.
> * @param website Weblog or null to get for all weblogs.
> * @param startDate Start date or null for no start date.
> * @param endDate End date or null for no end date.
> * @param offset Offset into results for paging
> * @param length Max comments to return (or -1 for no limit)
> * @returns List of WeblogEntryData objects.
> */
> public List getMostCommentedWeblogEntries(
> Weblog website,
> Date startDate,
> Date endDate,
> int offset,
> int length)
> throws WebloggerException;
>
> what's the right way to use it?
>
> Thanks
>
> Odelya YomTov - Glick
>
****************************************************************************
********
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer
viruses.
****************************************************************************
********
****************************************************************************
********
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer
viruses.
****************************************************************************
********
RE: ambiguousness in getMostCommentedWeblogEntries
Posted by Odelya YomTov-Glick <od...@jpost.com>.
Hi Allen, thanks for the answer. I still don't get results for the
$theEntries object.
When I try to print it, I get: $theEntries.size() instead of 100.
What could be the problem?
-----Original Message-----
From: Allen.Gilliland@Sun.COM [mailto:Allen.Gilliland@Sun.COM]
Sent: Monday, April 28, 2008 11:42 PM
To: user@roller.apache.org
Subject: Re: ambiguousness in getMostCommentedWeblogEntries
templates don't actually have the ability to directly call into the
backend manager classes, instead the calls first go through a model
class. you need to be looking for that method in the SiteModel class,
that will show you what is happening when you make the call in your
template.
-- Allen
Odelya YomTov-Glick wrote:
> Hi,
> When I try to use the method as Dave wrote to me like this:
> #set ($theEntries = $site.getMostCommentedWeblogEntries(20, 100))
> #foreach($entryStatCount in $theEntries)
> $entryStatCount.subjectNameLong
> $entryStatCount.subjectNameShort
> #end
> Nothing returns.
>
> I looked in the source code, and saw that actually WeblogManager expects
to
> use the method with different parameters!
> **
> * Get weblog enties ordered by descending number of comments.
> * @param website Weblog or null to get for all weblogs.
> * @param startDate Start date or null for no start date.
> * @param endDate End date or null for no end date.
> * @param offset Offset into results for paging
> * @param length Max comments to return (or -1 for no limit)
> * @returns List of WeblogEntryData objects.
> */
> public List getMostCommentedWeblogEntries(
> Weblog website,
> Date startDate,
> Date endDate,
> int offset,
> int length)
> throws WebloggerException;
>
> what's the right way to use it?
>
> Thanks
>
> Odelya YomTov - Glick
>
****************************************************************************
********
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer
viruses.
****************************************************************************
********
Re: ambiguousness in getMostCommentedWeblogEntries
Posted by Allen Gilliland <Al...@Sun.COM>.
templates don't actually have the ability to directly call into the
backend manager classes, instead the calls first go through a model
class. you need to be looking for that method in the SiteModel class,
that will show you what is happening when you make the call in your
template.
-- Allen
Odelya YomTov-Glick wrote:
> Hi,
> When I try to use the method as Dave wrote to me like this:
> #set ($theEntries = $site.getMostCommentedWeblogEntries(20, 100))
> #foreach($entryStatCount in $theEntries)
> $entryStatCount.subjectNameLong
> $entryStatCount.subjectNameShort
> #end
> Nothing returns.
>
> I looked in the source code, and saw that actually WeblogManager expects to
> use the method with different parameters!
> **
> * Get weblog enties ordered by descending number of comments.
> * @param website Weblog or null to get for all weblogs.
> * @param startDate Start date or null for no start date.
> * @param endDate End date or null for no end date.
> * @param offset Offset into results for paging
> * @param length Max comments to return (or -1 for no limit)
> * @returns List of WeblogEntryData objects.
> */
> public List getMostCommentedWeblogEntries(
> Weblog website,
> Date startDate,
> Date endDate,
> int offset,
> int length)
> throws WebloggerException;
>
> what's the right way to use it?
>
> Thanks
>
> Odelya YomTov - Glick
>