myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Iov <p...@voller-ernst.de>
Subject Re: Pagination of large database tables
Date Mon, 19 Feb 2007 16:00:52 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks Mohammad, but i don't think, it meets all of my needs :) I'm
using A4j/Facelets to provide flexible and CONSISTENT templating
support to the customers. It would be really strange to make some
exception just because one of used UIComponents don't work correctly.
The problem with t:dataScroller is that it generates
duplicated/inconsistent IDs if the underlying DataModel changes. So
I've extended the ac:AjaxDataScroller by Adrian Mitev to support events
and it works fine. I think, one custom UIComponent, which does exactly
what it have to do is much better than one, which provides "workaround"
for some other.<br>
<br>
regards,<br>
paul<br>
<br>
<blockquote
 cite="mid34b8543c0702190524wa7c5049p6e5025784ca93a20@mail.gmail.com"
 type="cite">Hello<br>
But if you use PPRPanelGroup of Tomahawk Sandbox components you can add
Ajax-support to your page easily and it work woth dataScroller perfectly<br>
  <br>
  <div><span class="gmail_quote">On 2/19/07, <b
 class="gmail_sendername">
Paul Iov</b> &lt;<a href="mailto:paul@voller-ernst.de">paul@voller-ernst.de</a>&gt;
wrote:</span>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
1ex;">
    <div bgcolor="#ffffff" text="#000000">Hi Pallavi!<br>
    <br>
First of all take a look at
    <a href="http://wiki.apache.org/myfaces/WorkingWithLargeTables"
 target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://wiki.apache.org/myfaces/WorkingWithLargeTables</a>.
The illustrating
code there is IMHO a little bit buggy (especially for subsets of large
datasets, which commes from EJB it makes no sense to fetch the same
page twice, since the sorting order never chahges), but generally this
approach works fine.<br>
    <br>
I have exactly the same usecase - large resultsets and fetching on
demand, but I'm using ac:AjaxDataScroller insteed of <span><font
 face="Arial" size="2">&lt;t:dataScroller&gt;,
because the second one is not Ajax-compatible :( Any way, with own
extended implementation</font></span> of DataModel im background it
would be preaty easy to implement "fetch more" feature, you are asking
for.<br>
    <br>
regards,<br>
paul<br>
    <br>
    <a href="mailto:pallavi.roy@wipro.com" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">pallavi.roy@wipro.com</a>
schrieb:
    <div><span class="e" id="q_110da22427302a2a_1">
    <blockquote
 cite="http://midF71A5A780F5E0D47A1A3AE99F3989BD30350D77B@HYD-MDP-MBX01.wipro.com"
 type="cite">
      <div><span><font face="Arial" size="2">Hi
All,</font></span></div>
      <div><span></span> </div>
      <div><span><font face="Arial" size="2">I
currently have a requirement for pagination.</font></span></div>
      <div><span><font face="Arial" size="2">I
want the following GUI display &lt;&lt;1 2 3 4 5 more &gt;&gt;.</font></span></div>
      <div><span><font face="Arial" size="2">Where
on click of &lt;&lt; is for previous.</font></span></div>
      <div><span><font face="Arial" size="2">And
on click of &gt;&gt; is for next.</font></span></div>
      <div><span><font face="Arial" size="2">So
with these two i could go ahead with &lt;t:dataScroller&gt; for the
above mentioned functionlity.</font></span></div>
      <div><span><font face="Arial" size="2">But
if i had the advantage of knowing the total number of rows with DB to
perform COUNT operation on the total number of rows.</font></span></div>
      <div><span></span> </div>
      <div><span><font face="Arial" size="2">But
for larger tables this wouldn't be efficient.</font></span></div>
      <div><span><font face="Arial" size="2">Hence
the requirement demands fetching rows in multiples of 250.</font></span></div>
      <div><span><font face="Arial" size="2">And
each page displaying 50 rows per page.</font></span></div>
      <div><span><font face="Arial" size="2">With
the click on more it would fetch the next 250 rows.</font></span></div>
      <div><span><font face="Arial" size="2">And
the display should look like &lt;&lt; 6 7 8 9 10 More
&gt;&gt;.(something similar to google's pagination).</font></span></div>
      <div><span></span> </div>
      <div><span><font face="Arial" size="2">Is
there a way by which i can implement this.</font></span></div>
      <div><span><font face="Arial" size="2">Or
can i extend the functionality of &lt;t:dataScroller&gt; to implement
this.</font></span></div>
      <div><span><font face="Arial" size="2">Any
suggestions are welcome.</font></span></div>
      <div><span></span> </div>
      <div><span></span> </div>
      <div><span><font face="Arial" size="2">Best
Regards,</font></span></div>
      <div><span><font face="Arial" size="2">Pallavi </font></span></div>
      <div><span></span> </div>
      <div><span></span> </div>
      <div><span></span> </div>
      <div><span></span> </div>
      <table>
        <tbody>
          <tr>
            <td bgcolor="#ffffff"><font color="#000000"><br>
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
addressee(s) and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately and destroy all copies of this message and any attachments.
            <br>
            <br>
WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of
viruses. The company accepts no liability for any damage caused by any
virus transmitted by this email.<br>
            <br>
            <a href="http://www.wipro.com" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">www.wipro.com</a><br>
            </font></td>
          </tr>
        </tbody>
      </table>
    </blockquote>
    <br>
    </span></div>
    </div>
  </blockquote>
  </div>
  <br>
  <br clear="all">
  <br>
-- <br>
Regards,<br>
Mohammad
</blockquote>
<br>
</body>
</html>

Mime
View raw message