referencing the documentation lucas provided we can see the number of 
records/page are provided by 
displaytag.properties
(version 1.1)
sort.amount=50

(version 1.2)
pagesize=50

..concerning how to manipulate what you're reading all you have to do is 
replace the InputStream with one from DS ...
package org.displaytag.sample.DisplaySourceServlet
    protected final void doGet(HttpServletRequest request, HttpServletResponse 
response) throws ServletException,
        IOException
    {
        String jspFile = request.getRequestURI();
        // lastIndexOf(".") can't be null, since the servlet is mapped to 
".source"
        jspFile = jspFile.substring(0, jspFile.lastIndexOf(".")); //$NON-NLS-1$
        if (jspFile.lastIndexOf("/") != -1) //$NON-NLS-1$
        {
            jspFile = jspFile.substring(jspFile.lastIndexOf("/") + 1); 
//$NON-NLS-1$
        }
        // only want to show sample pages, don't play with url!
        if (!jspFile.startsWith("example-")) //$NON-NLS-1$
        {
            throw new ServletException("Invalid file selected: " + jspFile); 
//$NON-NLS-1$
        }
        String fullName = EXAMPLE_FOLDER + jspFile;

//        InputStream inputStream = 
getServletContext().getResourceAsStream(fullName);

//replace the inputStream logic with a stream obtained from configured 
DataSource
//if you are using Oracle you can use oracle.sql.OracleJdbc2SQLInput 
readAsciiStream which returns InputStream

readAsciiStream
 public InputStream readAsciiStream() throws SQLException
(Return the next attribute in the stream as a stream of ASCII characters.
)

JavaDoc available at
http://www.oracle.com/technology/docs/tech/java/sqlj_jdbc/doc_library/javadoc/oracle.sql.OracleJdbc2SQLInput.html#_top_

and simply use that InputStream to read DataSource contents from

anyone else?
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Mon, 25 May 2009 08:49:33 -0400
> Subject: Re: Pagination
> From: bhaara...@gmail.com
> To: user@struts.apache.org
> 
> adding to this question...
> 
> I've asked this before as well but not gotten a clearer answer.
> 
> What if in the same example as this but when user clicks 'next' you want to
> go back and fetch the results again.  Will that be possible with display
> tag.  What I mean is that lets say that the list is being populated by a
> stored procedure.  Because of  performance, we are only getting 50 items at
> a time from the store procedure and displaying 50 on one page.  When user
> clicks Next, we want to go back and execute the SP to get the next set of 50
> results.
> 
> Any hints on how to achieve this with display tags?
> 
> On Mon, May 25, 2009 at 5:14 AM, Lukasz Lenart <lukasz.len...@googlemail.com
> > wrote:
> 
> > 2009/5/25 Murugesh <muruges...@gmail.com>:
> > > is their any way to modify the display?
> > >
> > > like the page no's and no of items coming on top , i need it to be
> > bottom.
> > > so where i have to chnage this?
> >
> > Check DisplayTag documentation, for begining that [1]
> >
> > [1] http://displaytag.sourceforge.net/1.2/configuration.html
> >
> >
> > Regards
> > --
> > Lukasz
> > http://www.lenart.org.pl/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >

_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage1_052009

Reply via email to