[Infusion-users] Trying to use Pager pageStrategy

Antranig Basman antranig.basman at colorado.edu
Thu Jan 21 18:09:21 UTC 2010


Hi there Kevin - on the face of it, hard to tell exactly what is causing 
this problem. I tried adjusting one of our standard samples to include 
the fluid.pager.gappedPageStrategy(4, 2) option which you show and it 
doesn't show the problem you are reporting.
http://source.fluidproject.org/svn/fluid/infusion/trunk/src/webapp/integration-demos/sakai
"headlumps is undefined" usually indicates some problem in fetching 
markup to form as the template - in this case the markup is expected to 
be the set of <li> tags inside the container holding the CSS class 
"flc-pager-links". Can you check that this structure is still present in 
your markup?
The page link elements themselves should also continue to be identified 
by the selectors defined at the pagerBar level, for example with classes 
flc-pager-pageLink etc.

Cheers,
A.


On 20/01/2010 17:41, Kevin Wilkinson UCI wrote:
> I have a successful data driven pager component working in my code.  It
> has been stable for a couple of months now.  Today when I tried to add
> the pageStrategy option to the PageList to look cleaner, the pager fails
> to finish rendering properly with this error.
>
> headlumps is undefined
> findChild()                   fluidRenderer.js (line 1062)
> renderRecurse() fluidRenderer.js (line 1124)
> renderTemplates()     fluidRenderer.js (line 1254)
> reRender()                  fluidRenderer.js (line 1371)
> (?)()                             Pager.js (line 173)
> fire() Fluid.js (line 608)
> fireModelChange() Pager.js (line 459)
> (?)() Pager.js (line 686)
> fire() Fluid.js (line 608)
> pagerImpl() Pager.js (line 735)
> pager() Pager.js (line 54)
> (?)() render...veTab=7 (line 381)
> success() jquery....min.js (line 29)
> handleError()             jquery....min.js (line 28)
> [Break on this error] return headlumps === null ? null : headlumps[0];
> fluidRenderer.js (line 1062)
>
> Can you point me to a problem that I've caused somehow?  I only added in
> one line of code, and in firebug the error appears to be caused when the
> pager is created with the pagerOptions element.
>
> Original code was:
>
>      var ajaxPath = "<c:url value="/ajax"/>";
>      $.post(ajaxPath, {
>              action: "all",
>              param: ""
>            },
>            function (data) {
>                if(data.error) {
>                  window.alert(data.error);
>                } else {
>                  orgs = data.model;
>                }
>
>                 var pagerOptions = {
>                         dataModel: orgs,
>                         columnDefs: [
>                           {key: "org", valuebinding: "*.org"},
>                           {key: "category", valuebinding: "*.category"},
>                           {key: "viewLink", valuebinding: "*.id",
>                               components: {
>                                   target:
> "javascript:<portlet:namespace/>showOrg(${'${'}*.id});"
>                                }
>                           }
>                         ],
>                         bodyRenderer: {
>                           type: "fluid.pager.selfRender",
>                           options: {
>                             selectors: {
>                              root: "#<portlet:namespace/>body-template"
>                          },
>                             row: "row:"
>                           }
>                         },
>                         pagerBar: {
>                                 type: "fluid.pager.pagerBar", options: {
>                                   pageList: {
>                                       type: "fluid.pager.renderedPageList",
>                                         options: {
>                                           linkBody: "a"
>                                         }
>                                   }
>                              }
>                         }
>                     };
>
> <portlet:namespace/>pager = fluid.pager("#<portlet:namespace/>orgTable",
> pagerOptions);
>
>            },
> "json"
>      );
>
> New code is now:
>
>      var ajaxPath = "<c:url value="/ajax"/>";
>      $.post(ajaxPath, {
>              action: "all",
>              param: ""
>            },
>            function (data) {
>                if(data.error) {
>                  window.alert(data.error);
>                } else {
>                  orgs = data.model;
>                }
>
>                 var pagerOptions = {
>                         dataModel: orgs,
>                         columnDefs: [
>                           {key: "org", valuebinding: "*.org"},
>                           {key: "category", valuebinding: "*.category"},
>                           {key: "viewLink", valuebinding: "*.id",
>                               components: {
>                                   target:
> "javascript:<portlet:namespace/>showOrg(${'${'}*.id});"
>                                }
>                           }
>                         ],
>                         bodyRenderer: {
>                           type: "fluid.pager.selfRender",
>                           options: {
>                             selectors: {
>                              root: "#<portlet:namespace/>body-template"
>                          },
>                             row: "row:"
>                           }
>                         },
>                         pagerBar: {
>                                 type: "fluid.pager.pagerBar", options: {
>                                   pageList: {
>                                       type: "fluid.pager.renderedPageList",
>                                         options: {
>                                           linkBody: "a",
>                                           pageStrategy:
> fluid.pager.gappedPageStrategy(4, 2)
>                                         }
>                                   }
>                              }
>                         }
>                     };
>
> <portlet:namespace/>pager = fluid.pager("#<portlet:namespace/>orgTable",
> pagerOptions);
>
>            },
> "json"
>      );
>
>
>
> _______________________________________________
> Infusion-users mailing list
> Infusion-users at fluidproject.org
> http://fluidproject.org/mailman/listinfo/infusion-users




More information about the Infusion-users mailing list