[Infusion-users] Trying to use Pager pageStrategy

Antranig Basman antranig.basman at colorado.edu
Mon Jan 25 05:58:14 UTC 2010


Hi there Kevin - thanks for sending this along. I think the best thing 
here is if you can prepare a ZIP file which can be run self-contained to 
demonstrate the problem - since I can see you are in a portalised 
environment this might not be completely straightforward but on the 
other hand might just be as simple as running "Save as HTML" in the 
browser once the view is running :)
There is clearly something a bit odd going on here and it would help a 
lot to have a test case to refer to -
Cheers,
Antranig.

On 21/01/2010 16:03, Kevin Wilkinson UCI wrote:
> Yes, I am following the "flc-pager-links" and "flc-pager-pageLink"
> syntax properly I believe.  Here is code for my lower nav bar.
>
>     <ul class="flc-pager-bottom" style="margin: 0pt; padding: 0pt;">
>     <li style="display:none;">
>     <ul class="pager-links flc-pager-links" style="margin: 0pt;">
>     <li value="1" class="flc-pager-pageLink"><a
>     href="javascript:;">1</a></li>
>     <li value="2" class="flc-pager-pageLink"><a
>     href="javascript:;">2</a></li>
>     <li value="3" class="flc-pager-pageLink"><a
>     href="javascript:;">3</a></li>
>     </ul>
>     </li>
>     <li class="flc-pager-previous"><a href="javascript:;">«
>     previous</a></li>
>     <li class="flc-pager-next"><a href="javascript:;">next »</a></li>
>     <span class="flc-pager-summary">1-10 of 500 organizations</span>
>     </ul>
>
>
> Like I said, it was working fine before and still works fine if I take
> out the pageStrategy option.
> o_O
>
> -Kevin W
>
>
> On Thu, Jan 21, 2010 at 10:09 AM, Antranig Basman
> <antranig.basman at colorado.edu <mailto:antranig.basman at colorado.edu>> wrote:
>
>     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
>         <mailto:Infusion-users at fluidproject.org>
>         http://fluidproject.org/mailman/listinfo/infusion-users
>
>
>




More information about the Infusion-users mailing list