Yes, JSTL is doing Data in View. Action is doing Data in Controller.
Data ... is done in data layer, depending on your DAO.
Again http://ibatis.com/common/example.html - if you look at bottom of page about pageNext.
Hopefully no one is writing to JDBC anymore, but using a DAO impl. That be like writing to Servlet and not using Struts.
You can limit the # of rows that come back in Transact SQL, pgSQL or plSQL. Tell me what Transact SQL mail list you are on (usenet?) and I will answer it there.
.V
JDBC/DAO questions are OT for Struts. Soon... hopefully view questions will be, so you can go to Tagblibs list or what view you use for that.
Leon Rosenberg wrote:
Despite the honourable wish to help,
How does an advice to use jstl-sql tags relates to a struts-user list?
To the original question: Why don't you put exactly the same amount of databeans in your arraylist as you want to show? And where do you do it? Exact, in your action.
Alternatively you could use one of many paging taglibs out there (check sourceforge).
-----Ursprüngliche Nachricht----- Von: David Bolsover [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 18. Januar 2005 11:47 An: Struts Users Mailing List Betreff: RE: How to limit the result?
Processing ResultSets into custom beans can be a frustrating process..
You should have look at javax.servlet.jsp.jstl.sql.ResultImpl and associated classes.
You will find in the jstl source distribution.
Essentially, with a little effort, these classes will process a ResultSet and return a javax.servlet.jsp.jstl.sql.Result object. The Result object is easily itterated over in your JSP
db
-----Original Message----- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: 18 January 2005 09:34 To: Struts Users Mailing List Subject: Re: How to limit the result?
After long search i found out that MSSQL does not support Limit / range of records to be fetched.
Now i am thinking -> 1)putting each row into one databean. 2)Put databean into ArrayList 3)send this arraylist back to JSP
with jstl tags i can loop through it and display. <c:foreach>...<c:out>
But how i can decide it has reached page limit ? because at that point of time i want to display my footer (and header for new set).
Is there any way to set some variable and keep on incrementing it .. check for pagesize and then include header/footer etc...
Is there any better solution ? Am i going a long way ?
regards Manisha
Manisha Sathe <[EMAIL PROTECTED]> wrote: I have a query which results into large data. This data i want to display in a group of 20. After every 20 records i want to add header and footer to it.
Is it possible to get the result set data into batch of 20 ? means can i specify start and end index of query ?
regards Manisha
--------------------------------- Do you Yahoo!? The all-new My Yahoo! What will yours do?
--------------------------------- Do you Yahoo!? The all-new My Yahoo! Get yours free! ======================================================= This message has been scanned for viruses and dangerous content using Vet Anti-Virus Protection and is believed to be clean. =======================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-- RiA-SoA w/JDNC <http://www.SandraSF.com> forums - help develop a community My blog <http://www.sandrasf.com/adminBlog>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]