This Question is Not Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
3 Replies Last post: Dec 3, 2008 3:46 AM by dongfang.zhang@landesk.com  
dongfang.zhang@landesk.com Novice 23 posts since
Aug 1, 2008
Currently Being Moderated

Dec 2, 2008 1:25 AM

Documents can't be shown in my widget

NoDocuments.JPGHi Todd,

 

    I made a new widget, which is to show my specified documents.  The functionality is the same as Popular Document Widget in

your product Clearspace Community 2.5.3.

    Here are some codes in protected Map<String, Object> loadProperties(WidgetContext widgetContext, ContainerSize size)

   

   JiveIterator<Document> documents1 = documentManager.getDocuments(community);
 
  
         for(Document document: documents1){
          Log.error("document.getID:" + document.getDocumentID());
          Log.error("document.getID:" + document.getPlainSubject());
         }
        
   properties.put("documents", documents1);
   properties.put("container", community);
   properties.put("numResults", getNumUsersToDisplay());


   Here is the FTL file.

  

<#include "/template/docs/include/doc-macros.ftl">
<#if containerSize == enums['com.jivesoftware.community.widget.Widget$ContainerSize'].SMALL>
     <#if (documents?exists && documents.hasNext())>
        ${"FreeMarker 1"}
        <@jive.jiveContentListSidebar content=documents limit=numResults />
     <#else>
        ${"FreeMarker 2"}
        <@jive.jiveEmptyContentListSidebar container=container showThreadLink=false showBlogPostLink=false/>
     </#if>
<#else>
    <#if (documents?exists && documents.hasNext())>
        ${"FreeMarker 3"}
        <@jive.jiveContentList content=documents showContainer=isRoot limit=numResults />
    <#else>
        ${"FreeMarker 4"}
        <@jive.jiveEmptyContentList container=container showThreadLink=false showBlogPostLink=false/>
    </#if>
</#if>


   Here is what I get from the Widget.

      NoDocuments.JPG

  Here is the log from the widget

    17:25:42,729 [http-8080-3] ERROR com.jivesoftware - document.getID:DOC-1502
17:25:42,729 [http-8080-3] ERROR com.jivesoftware - document.getID:The ldgetservicepermormanceinfo crashes on XP workstation with no paging file

 

   I think I have already found the documents, but it can't be rendered to the FTL file.

 

Thanks & Regards,

Aaron

Todd West JiveSupport 4,503 posts since
Jul 14, 2008
Currently Being Moderated
Dec 2, 2008 8:31 AM in response to: dongfang.zhang@landesk.com
Re: Documents can't be shown in my widget

Hi Aaron,

 

Are any of your other variables (container, numResults) making it across correctly?

 

-Todd

More Like This

  • Retrieving data ...