Return to Jive Software

644 Views 13 Replies Last post: Oct 1, 2008 2:00 PM by Will French RSS
lambert torres Novice 326 posts since
Jun 30, 2008
Currently Being Moderated

Jul 3, 2008 1:17 PM

Community Everywhere pagination

Final question..sorry before the wknd.  I see limits to how many conversations are shown on load?  Is pagination available too?  We'd like to limit it to ten comments visible at a time, but have the ability to page through comments in case there's more than 10 posted.

 

thanks.

Lambert

Will French Jive Employee 3,905 posts since
Nov 2, 2004
Currently Being Moderated
Jul 3, 2008 5:03 PM in response to: lambert torres
Re: Community Everywhere pagination

Hi Lambert,

 

I do not believe that pagination is supported out of the box. The external display was kept relatively simple to allow for faster delivery of the content. I will take a look at the code to see if this is a simple or complex customization, and let you know what I find next week.

 

Have a good weekend,

 

 

Nick Hill Jive Employee 87 posts since
May 25, 2006
Currently Being Moderated
Jul 5, 2008 11:32 AM in response to: lambert torres
Re: Community Everywhere pagination

You'd have to customize the freemarker template community-everywhere-content.ftl and change ${message.modificationDate?date} to    ${StringUtils.getTimeFromLong(message.modificationDate.time?long, 1)}

 

Nick Hill Jive Employee 87 posts since
May 25, 2006
Currently Being Moderated
Jul 8, 2008 8:34 AM in response to: lambert torres
Re: Community Everywhere pagination

Ah, yes. StringUtils is a static class that is automatically added to the freemarker context by webwork. Since community everywhere is its own servlet (outside of webwork), it will have to be added to your properties. Check out JiveFreemarkerManager (populateStatics) method to see how this is done. Basically, you will add the static class StringUtils to your model in the loadProperties method. Alternately, you might be able to load it up using the syntax ${statics['com.jivesoftware.util.StringUtils']}.

Nick Hill Jive Employee 87 posts since
May 25, 2006
Currently Being Moderated
Jul 9, 2008 10:11 AM in response to: lambert torres
Re: Community Everywhere pagination

You might need to create an auth token and stick it in the session so date utils can be accessed (it's dependent on the user's locale information). You should have the user information in the servlet, so its just a matter of creating a new auth token and sticking it in the session for date utils.

 

 

Nick Hill Jive Employee 87 posts since
May 25, 2006
Currently Being Moderated
Jul 9, 2008 10:44 AM in response to: lambert torres
Re: Community Everywhere pagination

The default constructor for DateUtils looks like this:

 


public DateUtils() {
        HttpServletRequest request = ServletActionContext.getRequest();
        User user = AuthFactory.getSessionUser(request);
        timeZone = LocaleUtils.getTimeZone(request, user);
        locale = LocaleUtils.getUserLocale(request, user);
    }

 

and AuthFactory.getSessionUser(request) simply gets the session for the request and checks for an auth token, which is where the NPE is happening from your previous log.

 

 

Starting over, we might be able to do this much easier. What if you ignore StringUtils all together. Since you already have a request object and a user, try simply creating a new DateUtils object with the constructor (request, user). Then add that initialized date utils object to your properties in the community everywhere servlet. From the ftl, simply call the method displayFriendly(date). Together, it would look something like this in the loadProperties method of CommunityEverywhereSerlvet:

 


        properties.put("dateUtils", new DateUtils(request, user));

 

and in community-everywhere-content.ftl

 


${dateUtils.displayFriendly(message.modificationDate?date)}

 

Let me know if that works for you.

 

 

Geoff Novice 34 posts since
Jul 2, 2008
Currently Being Moderated
Oct 1, 2008 1:33 PM in response to: Will French
Re: Community Everywhere pagination

Hi Will,

 

Any updates on whether pagination is supported for CE?

 

Thanks!

Will French Jive Employee 3,905 posts since
Nov 2, 2004
Currently Being Moderated
Oct 1, 2008 2:00 PM in response to: Geoff
Re: Community Everywhere pagination

Hi,

 

This is still logged as a new feature request internally, but is not currently scheduled for a release.

More Like This

  • Retrieving data ...

Bookmarked By (1)

Case Product Issues

Loading Jira issues

Loading related product issues for this case
To better serve our customers we have included functionality to automatically follow up on a case after it has been idle for more than 5 days, and then auto close after an additional 3 days of inactivity. Choose No to acknowledge that this case will remain idle for longer than 5 days.
Making cases public allows other customers to learn from the solution of the case. It can also be used to gain feedback from others in the community. Ask our Support Engineers for more info, but we encourage you to make your cases public.