RE: Paging for table...
Hi, I always wondered a question about this kind of server side paging: THE PROBLEM: I suppose it is based on getting all the results at once from the database and storing them in session. Further on, data is extracted in slots from the session and thrown to a JSP for rendering. Well, I guess that, if this session data is large, in clustered environments, the data is balanced among the different servers causing a high network traffic which becomes in a performance issue for the whole system. Even worst, a lot of times just a small amount of data is browsed from the client side, so there is not reason to catch MBs in session. Is it not a bad design pattern? THE GUESSED SOLUTION: Would not it be better to make a new query to the datasource (database usually), in order to recover just a slot of data, store it in request scope and send to the JSP for rendering. Would not be this second approach save machine resources? In that way server would not be context aware, and would work just as proxy/formatter among client and datasource. Is not better approach? Or perhaps would depends on the data size to be fetched? Thanks for your opinions, Adolfo. From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Paging for table... Date: Sun, 4 Jan 2004 10:50:22 +0530 David, Check for the details on http://www.servletsuite.com/servlets/pagertag.htm Rahul -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 10:48 AM To: Struts Users Mailing List Subject: RE: Paging for table... Rahul, What is this paging taglib? Do you have a url? Curious, David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 12:15 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Paging for table... Check for paging taglib available for struts which will meet your requirements. Rahul -Original Message- From: Vasudevrao Gupta M V S S S (WT01 - UTILITIES) Sent: Saturday, January 03, 2004 8:57 PM To: 'David Friedman'; 'Struts Users Mailing List' Subject: RE: Paging for table... .Can you please send across the sample code that you have developed??? -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: 03 January 2004 20:57 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Paging for table... I use displaytag, www.displaytag.org, for that. Regards, David -Original Message- From: vasudevrao gupta [mailto:[EMAIL PROTECTED] Sent: Saturday, January 03, 2004 7:40 AM To: 'Struts Users Mailing List' Subject: Paging for table... Hi, I have a requirement where in user executes a query and gets some x number of records. I have to show the user 1-y records per page and when user clicks next button, he should be be able to see next y number of records.(Similar to yahoo site ). Can any one pls tell me if struts frame work provides any inbuilt framework to do this kind of paging Regards VasudevRaoGupta Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended
Re: Paging for table...
If you are talking about an SQL database, this is exactly the concept of cursor scrolling. The JDBC standard calls the same thing result set scrolling. The problem is that not all databases provide good support for this. In particular, the most popular database among corporations, Oracle, does not support cursor scrolling at the database engine level. Oracle does support result set scrolling, but accomplishes it by buffering the query result in the JDBC driver memory space on the client or application server. The real difficulty with this concept for databases is the necessity to support SQL operators like ORDER BY, GROUP BY, SELECT DISTINCT, COUNT(DISTINCT, UNION, MINUS, DIFFER, etc. which often involve sorting. The final order of the rows is not known until the sort steps are completed. Ed - Original Message - From: Adolfo Miguelez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 04, 2004 10:41 AM Subject: RE: Paging for table... Hi, I always wondered a question about this kind of server side paging: THE PROBLEM: I suppose it is based on getting all the results at once from the database and storing them in session. Further on, data is extracted in slots from the session and thrown to a JSP for rendering. Well, I guess that, if this session data is large, in clustered environments, the data is balanced among the different servers causing a high network traffic which becomes in a performance issue for the whole system. Even worst, a lot of times just a small amount of data is browsed from the client side, so there is not reason to catch MBs in session. Is it not a bad design pattern? THE GUESSED SOLUTION: Would not it be better to make a new query to the datasource (database usually), in order to recover just a slot of data, store it in request scope and send to the JSP for rendering. Would not be this second approach save machine resources? In that way server would not be context aware, and would work just as proxy/formatter among client and datasource. Is not better approach? Or perhaps would depends on the data size to be fetched? Thanks for your opinions, Adolfo. From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Paging for table... Date: Sun, 4 Jan 2004 10:50:22 +0530 David, Check for the details on http://www.servletsuite.com/servlets/pagertag.htm Rahul -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 10:48 AM To: Struts Users Mailing List Subject: RE: Paging for table... Rahul, What is this paging taglib? Do you have a url? Curious, David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 12:15 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Paging for table... Check for paging taglib available for struts which will meet your requirements. Rahul -Original Message- From: Vasudevrao Gupta M V S S S (WT01 - UTILITIES) Sent: Saturday, January 03, 2004 8:57 PM To: 'David Friedman'; 'Struts Users Mailing List' Subject: RE: Paging for table... .Can you please send across the sample code that you have developed??? -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: 03 January 2004 20:57 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Paging for table... I use displaytag, www.displaytag.org, for that. Regards, David -Original Message- From: vasudevrao gupta [mailto:[EMAIL PROTECTED] Sent: Saturday, January 03, 2004 7:40 AM To: 'Struts Users Mailing List' Subject: Paging for table... Hi, I have a requirement where in user executes a query and gets some x number of records. I have to show the user 1-y records per page and when user clicks next button, he should be be able to see next y number of records.(Similar to yahoo site ). Can any one pls tell me if struts frame work provides any inbuilt framework to do this kind of paging Regards VasudevRaoGupta Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender
Re: Paging for table...
Ed, any URL(s) which might enlighten me further on resultset/cursor scrolling and the support provided by different databses in this regard. Thanks, Santosh Ed Dowgiallo wrote: If you are talking about an SQL database, this is exactly the concept of cursor scrolling. The JDBC standard calls the same thing result set scrolling. The problem is that not all databases provide good support for this. In particular, the most popular database among corporations, Oracle, does not support cursor scrolling at the database engine level. Oracle does support result set scrolling, but accomplishes it by buffering the query result in the JDBC driver memory space on the client or application server. The real difficulty with this concept for databases is the necessity to support SQL operators like ORDER BY, GROUP BY, SELECT DISTINCT, COUNT(DISTINCT, UNION, MINUS, DIFFER, etc. which often involve sorting. The final order of the rows is not known until the sort steps are completed. Ed - Original Message - From: Adolfo Miguelez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 04, 2004 10:41 AM Subject: RE: Paging for table... Hi, I always wondered a question about this kind of server side paging: THE PROBLEM: I suppose it is based on getting all the results at once from the database and storing them in session. Further on, data is extracted in slots from the session and thrown to a JSP for rendering. Well, I guess that, if this session data is large, in clustered environments, the data is balanced among the different servers causing a high network traffic which becomes in a performance issue for the whole system. Even worst, a lot of times just a small amount of data is browsed from the client side, so there is not reason to catch MBs in session. Is it not a bad design pattern? THE GUESSED SOLUTION: Would not it be better to make a new query to the datasource (database usually), in order to recover just a slot of data, store it in request scope and send to the JSP for rendering. Would not be this second approach save machine resources? In that way server would not be context aware, and would work just as proxy/formatter among client and datasource. Is not better approach? Or perhaps would depends on the data size to be fetched? Thanks for your opinions, Adolfo. From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Paging for table... Date: Sun, 4 Jan 2004 10:50:22 +0530 David, Check for the details on http://www.servletsuite.com/servlets/pagertag.htm Rahul -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 10:48 AM To: Struts Users Mailing List Subject: RE: Paging for table... Rahul, What is this paging taglib? Do you have a url? Curious, David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 12:15 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Paging for table... Check for paging taglib available for struts which will meet your requirements. Rahul -Original Message- From: Vasudevrao Gupta M V S S S (WT01 - UTILITIES) Sent: Saturday, January 03, 2004 8:57 PM To: 'David Friedman'; 'Struts Users Mailing List' Subject: RE: Paging for table... .Can you please send across the sample code that you have developed??? -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: 03 January 2004 20:57 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Paging for table... I use displaytag, www.displaytag.org, for that. Regards, David -Original Message- From: vasudevrao gupta [mailto:[EMAIL PROTECTED] Sent: Saturday, January 03, 2004 7:40 AM To: 'Struts Users Mailing List' Subject: Paging for table... Hi, I have a requirement where in user executes a query and gets some x number of records. I have to show the user 1-y records per page and when user clicks next button, he should be be able to see next y number of records.(Similar to yahoo site ). Can any one pls tell me if struts frame work provides any inbuilt framework to do this kind of paging Regards VasudevRaoGupta Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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
Paging for table...
Hi, I have a requirement where in user executes a query and gets some x number of records. I have to show the user 1-y records per page and when user clicks next button, he should be be able to see next y number of records.(Similar to yahoo site ). Can any one pls tell me if struts frame work provides any inbuilt framework to do this kind of paging Regards VasudevRaoGupta Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Paging for table...
I use displaytag, www.displaytag.org, for that. Regards, David -Original Message- From: vasudevrao gupta [mailto:[EMAIL PROTECTED] Sent: Saturday, January 03, 2004 7:40 AM To: 'Struts Users Mailing List' Subject: Paging for table... Hi, I have a requirement where in user executes a query and gets some x number of records. I have to show the user 1-y records per page and when user clicks next button, he should be be able to see next y number of records.(Similar to yahoo site ). Can any one pls tell me if struts frame work provides any inbuilt framework to do this kind of paging Regards VasudevRaoGupta Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Paging for table...
.Can you please send across the sample code that you have developed??? -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: 03 January 2004 20:57 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Paging for table... I use displaytag, www.displaytag.org, for that. Regards, David -Original Message- From: vasudevrao gupta [mailto:[EMAIL PROTECTED] Sent: Saturday, January 03, 2004 7:40 AM To: 'Struts Users Mailing List' Subject: Paging for table... Hi, I have a requirement where in user executes a query and gets some x number of records. I have to show the user 1-y records per page and when user clicks next button, he should be be able to see next y number of records.(Similar to yahoo site ). Can any one pls tell me if struts frame work provides any inbuilt framework to do this kind of paging Regards VasudevRaoGupta Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Paging for table...
The site I gave you, www.displaytag.org (with source and binaries available from SourceForge.net), lists plenty of examples and code. Basically, you have a collection of objects (usually in request or session scope, but you can do it in page scope) and set your tag with the columns. From their basic columns example, if you have a List stored as test, for each item you can display the fields id, name, email, status, description using the below code: display:table name=test display:column property=id / display:column property=name / display:column property=email / display:column property=status / display:column property=description / /display:table Just keep in mind the binary updates a few jars to newer versions. Off the top of my head, I think it updates (don't pay attention, I just code *grin*) commons-lang, commons-beanutils, commons-logging, and commons-collections. But don't worry, they are in the binary distribution's example .war application and work fine with Struts v1.1 (probably with v1.0 as well). Also, fancier things are available, such as sorting, grouping, and downloading the fields as excel, csv, and xml. Regards, David -Original Message- From: vasudevrao gupta [mailto:[EMAIL PROTECTED] Sent: Saturday, January 03, 2004 10:27 AM To: 'David Friedman'; 'Struts Users Mailing List' Subject: RE: Paging for table... .Can you please send across the sample code that you have developed??? -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: 03 January 2004 20:57 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Paging for table... I use displaytag, www.displaytag.org, for that. Regards, David -Original Message- From: vasudevrao gupta [mailto:[EMAIL PROTECTED] Sent: Saturday, January 03, 2004 7:40 AM To: 'Struts Users Mailing List' Subject: Paging for table... Hi, I have a requirement where in user executes a query and gets some x number of records. I have to show the user 1-y records per page and when user clicks next button, he should be be able to see next y number of records.(Similar to yahoo site ). Can any one pls tell me if struts frame work provides any inbuilt framework to do this kind of paging Regards VasudevRaoGupta Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Paging for table...
Check for paging taglib available for struts which will meet your requirements. Rahul -Original Message- From: Vasudevrao Gupta M V S S S (WT01 - UTILITIES) Sent: Saturday, January 03, 2004 8:57 PM To: 'David Friedman'; 'Struts Users Mailing List' Subject: RE: Paging for table... .Can you please send across the sample code that you have developed??? -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: 03 January 2004 20:57 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Paging for table... I use displaytag, www.displaytag.org, for that. Regards, David -Original Message- From: vasudevrao gupta [mailto:[EMAIL PROTECTED] Sent: Saturday, January 03, 2004 7:40 AM To: 'Struts Users Mailing List' Subject: Paging for table... Hi, I have a requirement where in user executes a query and gets some x number of records. I have to show the user 1-y records per page and when user clicks next button, he should be be able to see next y number of records.(Similar to yahoo site ). Can any one pls tell me if struts frame work provides any inbuilt framework to do this kind of paging Regards VasudevRaoGupta Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Paging for table...
Rahul, What is this paging taglib? Do you have a url? Curious, David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 12:15 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Paging for table... Check for paging taglib available for struts which will meet your requirements. Rahul -Original Message- From: Vasudevrao Gupta M V S S S (WT01 - UTILITIES) Sent: Saturday, January 03, 2004 8:57 PM To: 'David Friedman'; 'Struts Users Mailing List' Subject: RE: Paging for table... .Can you please send across the sample code that you have developed??? -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: 03 January 2004 20:57 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Paging for table... I use displaytag, www.displaytag.org, for that. Regards, David -Original Message- From: vasudevrao gupta [mailto:[EMAIL PROTECTED] Sent: Saturday, January 03, 2004 7:40 AM To: 'Struts Users Mailing List' Subject: Paging for table... Hi, I have a requirement where in user executes a query and gets some x number of records. I have to show the user 1-y records per page and when user clicks next button, he should be be able to see next y number of records.(Similar to yahoo site ). Can any one pls tell me if struts frame work provides any inbuilt framework to do this kind of paging Regards VasudevRaoGupta Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Paging for table...
David, Check for the details on http://www.servletsuite.com/servlets/pagertag.htm Rahul -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 10:48 AM To: Struts Users Mailing List Subject: RE: Paging for table... Rahul, What is this paging taglib? Do you have a url? Curious, David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 12:15 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Paging for table... Check for paging taglib available for struts which will meet your requirements. Rahul -Original Message- From: Vasudevrao Gupta M V S S S (WT01 - UTILITIES) Sent: Saturday, January 03, 2004 8:57 PM To: 'David Friedman'; 'Struts Users Mailing List' Subject: RE: Paging for table... .Can you please send across the sample code that you have developed??? -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: 03 January 2004 20:57 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Paging for table... I use displaytag, www.displaytag.org, for that. Regards, David -Original Message- From: vasudevrao gupta [mailto:[EMAIL PROTECTED] Sent: Saturday, January 03, 2004 7:40 AM To: 'Struts Users Mailing List' Subject: Paging for table... Hi, I have a requirement where in user executes a query and gets some x number of records. I have to show the user 1-y records per page and when user clicks next button, he should be be able to see next y number of records.(Similar to yahoo site ). Can any one pls tell me if struts frame work provides any inbuilt framework to do this kind of paging Regards VasudevRaoGupta Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Paging with
hi, I need to do paging of dropdown with multiple values in pagewise manner.i am able to do the pagewise data (in each page i need to display 20 records only,ie page 2 starts with 21 to 40 etc).I have done this paging .no problem.but the issue is ,in page1 i have selected 2 values and page2 i have selected 1 value.when i am coming back to page1 i need to show the selected values (like in html option value=2 selected etc).how to incorporate this feature with struts. My drop down code looks like html:select property=globalUsers size=9 multiple=true html:options name=abc labelName=abc/ /html:select Regards -Srini
Paging
Hi People!!! Anybody knows, how can I do paging with Struts??? (Previous 1 - 2 - 3 ... Next) And changing the color of the rows on the table each iteration? Is there any Tag Lib who do this??? Tanks!!! []´s Mauricio
Re: Paging
Mauricio, You can look at 'struts-layout' : http://struts.application-servers.com/ It is a quite powerful taglib that includes, among other stuff, paging management. Fred Le lun 03/11/2003 12:43, Mauricio T. Ferraz a crit : Hi People!!! Anybody knows, how can I do paging with Struts??? (Previous 1 - 2 - 3 ... Next) And changing the color of the rows on the table each iteration? Is there any Tag Lib who do this??? Tanks!!! []s Mauricio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paging
http://displaytag.sourceforge.net/ (my favorite, new 1.0 beta out) http://jsptags.com/tags/navigation/pager/index.jsp HTH, -- Chris - Original Message - From: Frederic Dernbach [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 03, 2003 12:59 PM Subject: Re: Paging Mauricio, You can look at 'struts-layout' : http://struts.application-servers.com/ It is a quite powerful taglib that includes, among other stuff, paging management. Fred Le lun 03/11/2003 12:43, Mauricio T. Ferraz a crit : Hi People!!! Anybody knows, how can I do paging with Struts??? (Previous 1 - 2 - 3 ... Next) And changing the color of the rows on the table each iteration? Is there any Tag Lib who do this??? Tanks!!! []s Mauricio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paging
Christian Bollmeyer wrote: http://displaytag.sourceforge.net/ (my favorite, new 1.0 beta out) The last time I used this tag was a long time ago (over 5 months). What I didn't like about it, at the time, was that it stored your entire collection in session scope. This is ok for small to moderate sized collections of light objects, but if you want paging where you end up with a new query to bring back your objects then you'll have to implement something else. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paging
Hi Visit this URL, it works great with struts or any jsp framework http://kulkarni_ash.tripod.com/howto/jsptaglib-howto.html Ashish --- Mauricio T. Ferraz [EMAIL PROTECTED] wrote: Hi People!!! Anybody knows, how can I do paging with Struts??? (Previous 1 - 2 - 3 ... Next) And changing the color of the rows on the table each iteration? Is there any Tag Lib who do this??? Tanks!!! []´s Mauricio __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paging
- Original Message - From: Rick Reumann [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 03, 2003 3:29 PM Subject: Re: Paging Christian Bollmeyer wrote: http://displaytag.sourceforge.net/ (my favorite, new 1.0 beta out) The last time I used this tag was a long time ago (over 5 months). What I didn't like about it, at the time, was that it stored your entire collection in session scope. This is ok for small to moderate sized collections of light objects, but if you want paging where you end up with a new query to bring back your objects then you'll have to implement something else. Definitely, but then, most paging solutions that work on Collections do the same, including the JSTL approach described here in more detail: http://developer.java.sun.com/developer/Books/javaprogramming/jstl/jstl_chap 05.pdf Then, a grep on the 1.0-b1 source tree for 'session' shows only two references (both of them in mere utility functions), so I think the Collection doesn't necessarily have to be exactly in Session scope, but can be in any scope. Probably Matt Raible can shed more light on this matter. But what do you recommend? I saw there's a paginatedList feature in iBATIS, but I don't have any experience with it yet. -- Rick -- Chris. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paging
Ashish Kulkarni wrote: Visit this URL, it works great with struts or any jsp framework http://kulkarni_ash.tripod.com/howto/jsptaglib-howto.html Yea page not found errors work great with any framework, I agree:0 -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Paging
Rick, I started using the 1.0 beta 2 this weekend and it's full of impressive changes including fixed exports so it works with page breaks (previously, it only exported what was on the screen). About your copying of objects, the docs say that copying will happen if you let the tags sort the objects instead of using in the natural order it was saved into scope (request, session, application). However, it shouldn't be that bad since it is lists and iterators and will should only be address references for the copy into a new list/Iterator it sorts with, I think. To be sure, ask on their user list: http://www.mail-archive.com/index.php?hunt=displaytag Regards, David -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: Monday, November 03, 2003 9:29 AM To: Struts Users Mailing List Subject: Re: Paging Christian Bollmeyer wrote: http://displaytag.sourceforge.net/ (my favorite, new 1.0 beta out) The last time I used this tag was a long time ago (over 5 months). What I didn't like about it, at the time, was that it stored your entire collection in session scope. This is ok for small to moderate sized collections of light objects, but if you want paging where you end up with a new query to bring back your objects then you'll have to implement something else. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paging
- Original Message - From: Rick Reumann [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 03, 2003 4:46 PM Subject: Re: Paging Ashish Kulkarni wrote: Visit this URL, it works great with struts or any jsp framework http://kulkarni_ash.tripod.com/howto/jsptaglib-howto.html Yea page not found errors work great with any framework, I agree:0 -- Rick ?? Well, no problems from here, at least. As it's short enough, I'll just post it here: Using JSP taglib for paging Step 1 download jsp taglib from http://jsptags.com/tags/navigation/pager/download.jsp Step 2 Copy pager-taglib.tld in WEB-INF directory of web application Copy pager-taglib.jar in WEB-INF/lib directory of web application Step 3 Define tld in web.xml taglib taglib-urihttp://jsptags.com/tags/navigation/pager/taglib-uri taglib-location/WEB-INF/pager-taglib.tld/taglib-location /taglib Step 4 Define the tag lib in jsp %@ taglib uri=/WEB-INF/pager-taglib.tld prefix=pg % Step 5 Define number of pages to display etc in jsp pg:pager maxIndexPages=10 maxPageItems=10 export=pagerPageNumber=pageNumber !-- pagerPageNumber is used by me in the logic to display the current page in different color with out link-- Step 6 Create a loop for displaying data % while (crs.next()) !-where crs is cached row set, this object must be ArrayList, Vector, Collection, ResultSet which can be scrolled -- pg:item { % % out.print(crs.getString(L820FIRM).trim()); % % } % /pg:item Step 7 Logic to display the page numbers and next page and previous page arrows for navigation pg:index pg:prev a href=%=pageUrl% !-- some image text to display navigation to previous page --/a /pg:prev pg:pages if (pageNumber == pagerPageNumber) { // same page so no link here %=pageNumber% } else { // other pages where the user can jump a href=%=pageUrl% %= pageNumber %/a } /pg:pages pg:next a href=%=pageUrl% !-- some image text to display navigation to next page --/a /pg:next /pg:index Step 8 end of pager taglib /pg:pager More documentation can be found at http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html HTH, -- Chris. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paging
Christian Bollmeyer wrote: But what do you recommend? I saw there's a paginatedList feature in iBATIS, but I don't have any experience with it yet. -- You have to use 3 things together: 1. Display tag pagination (good for thousands of rows, maybe all you need, I store in request scope, let iBatis cache for all users that run same querry at Model layer) 2. iBatis pagination and most important you did not mention: #3: Sql select * from tableX limit 1000 offset 2 order by date (good for unlimited # of rows, cached by ibatis implicitly) Than you have a nice scaleable google like pagination. -- Chris. -- Victor Cekvenich, Struts Instructor (215) 321-9146 Advanced Struts Training http://basebeans.com/do/cmsPg?content=TRAINING Server Side Java training with Rich UI, mentoring, designs, samples and project recovery in North East. Simple best practice basic Portal, a Struts CMS, Membership, Forums, Shopping and Credit processing, http://basicportal.com software, ready to develop/customize; requires a db to run. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paging
hello rick, i am also using the beta version, undoubtly it works great(wonderful work matt!!!) but even now the problem with the export is that in case its someone under one of the tiles. there is no way to set the content-type once the page has been loaded and hence the xml/cvs/excel export in stuffed someone in the html code for the rest of the page. i had one workaround for this, using a jsp with only the same display tag. and since its an export the page isnt (visibly) loaded and i get the save as dialog box. in case u had a similar problem, and u came up with a better solution do let me know thanks. David Friedman wrote: Rick, I started using the 1.0 beta 2 this weekend and it's full of impressive changes including fixed exports so it works with page breaks (previously, it only exported what was on the screen). About your copying of objects, the docs say that copying will happen if you let the tags sort the objects instead of using in the natural order it was saved into scope (request, session, application). However, it shouldn't be that bad since it is lists and iterators and will should only be address references for the copy into a new list/Iterator it sorts with, I think. To be sure, ask on their user list: http://www.mail-archive.com/index.php?hunt=displaytag Regards, David -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: Monday, November 03, 2003 9:29 AM To: Struts Users Mailing List Subject: Re: Paging Christian Bollmeyer wrote: http://displaytag.sourceforge.net/ (my favorite, new 1.0 beta out) The last time I used this tag was a long time ago (over 5 months). What I didn't like about it, at the time, was that it stored your entire collection in session scope. This is ok for small to moderate sized collections of light objects, but if you want paging where you end up with a new query to bring back your objects then you'll have to implement something else. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rajat Pandit | [EMAIL PROTECTED] +91 612 3117606 [ Developer and Part Time Human Being] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Paging through DB ResultSets
Model Layer If you database supports *limit* clause, use that. OR Use Paging Patterns (known as Value List Handler in J2EE but i think it's misnomer ;-) Presentation Layer Use Pager Taglib |-Original Message- |From: Kapadia Mitesh-C23457 [mailto:[EMAIL PROTECTED] |Sent: Tuesday, August 26, 2003 1:53 AM |To: [EMAIL PROTECTED] |Subject: Paging through DB ResultSets | | |Any suggestions or ideas on how I can page through a DB ResultSet? | |Thanks in advance. | |- Mitesh | - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Paging through DB ResultSets
Any suggestions or ideas on how I can page through a DB ResultSet? Thanks in advance. - Mitesh
How to build a paging view(first/previous/next/last) within struts?
I use the iterate tag to show the records set. But is there any good way to show the records in several pages and with first,previous,next,last button in each pages? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Paging a collection property
Hi, I have built some thing similar... And if u are using u r own tag to built pagination, this should be simple... What u should be doing is use indexed properties(keep a collection of beans in form..)And in u r tag build indexed parameter names on page. html:text name=MyForm property=%=\beanList[\+i+\].Name\%/ Here MyForm has indexed getters and setters for the beans. Hopw this helps, regards, Shirish -Original Message- From: Jorge Mascena [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 8:06 PM To: 'Struts Users Mailing List' Subject: RES: Paging a collection property Sorry if I didn't explain the problem better. The pagination itself is ok (I've built a taglib that's equivalent to the one you pointed me). My question is how I can bind the input fields generated by the html and/or nested tags to the underlying objects so that any change the user makes to the input fields will be reflected on the properties of the corresponding books (to use the same example from the original message). Say the user is on page 2 and each page has 10 books. He changes the title of the first book of the page and submits the form. I want to know if struts will be smart enough to update the title of the 11th book and not the 1st book of the collection of books of the author. If so, what do I have to do to accomplish that? Thanks Jorge Mascena -Mensagem original- De: Vic Cekvenich [mailto:[EMAIL PROTECTED] Enviada em: Monday, March 24, 2003 3:22 PM Para: [EMAIL PROTECTED] Assunto: Re: Paging a collection property Look at display tag in google. hth, .V Jorge Mascena wrote: I need some directions on how to use the struts html and/or neste taglibs to handle the case where there's a collection property of a form bean that may contain a big number of objects. In this case, I'd like to able to do some sort of paging on these objects and I'd like to know if struts have any support for that. For example: I have a form bean, AuthorFormBean, that has a collection of books he wrote. I can use the nested taglib to render the book collection, so the user can fill the books data from the same form he fills the rest of the data about the author. So far, so good. The problem (or question) is: what if the number of books gets too big and I want to split these books into pages (and have a navigator for those pages), but they still belong to the same form bean, so no matter which page the user is, the nested tags (nested:text, for example) will know the correct index of the objects we're talking about (if we're on page 2 and each page has 10 books, the nested tags will start getting the objects from index 9 and not 0, and so on) and properly populates the input fields and updates the corresponding objects when loading and submiting the form respectively. I know how to do it directly with pure html code, but I'd like to know if it would be possible to get some advantage on using struts for this matter. I hope I could make myself clear. Thanks for any help. Jorge Mascena - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Catalogue Paging storing selected items
Hi Guys, I have a paging catalogue of items which all works fine but i'm wondering how do i store selected items across multiple pages?? As i move to another page should i store the select item keys in my session before displaying the next page??? Any ideas?? _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Catalogue Paging storing selected items
create a javabean to contain the items like a shopping cart and place that in the session scope for the user On Tuesday 25 March 2003 9:29 am, Pat Quinn wrote: Hi Guys, I have a paging catalogue of items which all works fine but i'm wondering how do i store selected items across multiple pages?? As i move to another page should i store the select item keys in my session before displaying the next page??? Any ideas?? _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LookupDispatchAction + Paging with form submit
I have a LookupDispatchAction as follows: protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(label.catalogue.find, doFind); map.put(label.catalogue.addtoCart, doAddToCart); map.put(label.paging, doPaging); return map; } I display my paging details using a Href's for eg. a href=/myWebApp/myLookupDispatchAction.do?action=pagingpager.offset=82/a This all worked fine for me... but i then need to change my href to submit the form as i page to the next page (I want to pick up client changes as they page... redirecting to the next view doesn't work as you'd expect) . So i changed my paging href's to the following: a href=# onClick=dopaging(8)2/a I have the following javascript method defined in the same jsp file: function dopaging(offset) { document.forms[0].submit.value = /myLookupDispatchAction.do?action=pagingpager.offset= + offset; document.forms[0].submit(); } I then get the following error: ERROR BaseAction::execute unexpected exception javax.servlet.ServletException: Request[/myLookupDispatchAction] does not contain handler parameter named action at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:200) Any ideas guys... is there a better way to do this??? _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LookupDispatchAction + Paging with form submit
Looks like the action parameter isnt getting through. Hmm. Heres why: snip document.forms[0].submit.value = /myLookupDispatchAction.do?action=pagingpager.offset= + offset; /snip You seem to be setting the wrong attribute. Try: document.forms[0].action = /myLookupDispatchAction.do?action=pagingpager.offset= + offset; btw Despite being used in several struts examples, the parameter name action is actually a very bad choice as it shadows a javascript form object attribute also named action (which you probably noticed in my potential solution above - shouldnt hurt as part of the url but as an html field it will be bad as it will stop you setting the form action attribute in javascript). A better choice of parameter name would be method or bob (hehe). /btw -Original Message- From: Pat Quinn [mailto:[EMAIL PROTECTED] Sent: Tuesday, 25 March 2003 22:29 To: [EMAIL PROTECTED] Subject: LookupDispatchAction + Paging with form submit I have a LookupDispatchAction as follows: protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(label.catalogue.find, doFind); map.put(label.catalogue.addtoCart, doAddToCart); map.put(label.paging, doPaging); return map; } I display my paging details using a Href's for eg. a href=/myWebApp/myLookupDispatchAction.do?action=pagingpager.offset=82/a This all worked fine for me... but i then need to change my href to submit the form as i page to the next page (I want to pick up client changes as they page... redirecting to the next view doesn't work as you'd expect) . So i changed my paging href's to the following: a href=# onClick=dopaging(8)2/a I have the following javascript method defined in the same jsp file: function dopaging(offset) { document.forms[0].submit.value = /myLookupDispatchAction.do?action=pagingpager.offset= + offset; document.forms[0].submit(); } I then get the following error: ERROR BaseAction::execute unexpected exception javax.servlet.ServletException: Request[/myLookupDispatchAction] does not contain handler parameter named action at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction. java:200) Any ideas guys... is there a better way to do this??? _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Paging a collection property
I need some directions on how to use the struts html and/or neste taglibs to handle the case where there's a collection property of a form bean that may contain a big number of objects. In this case, I'd like to able to do some sort of paging on these objects and I'd like to know if struts have any support for that. For example: I have a form bean, AuthorFormBean, that has a collection of books he wrote. I can use the nested taglib to render the book collection, so the user can fill the books data from the same form he fills the rest of the data about the author. So far, so good. The problem (or question) is: what if the number of books gets too big and I want to split these books into pages (and have a navigator for those pages), but they still belong to the same form bean, so no matter which page the user is, the nested tags (nested:text, for example) will know the correct index of the objects we're talking about (if we're on page 2 and each page has 10 books, the nested tags will start getting the objects from index 9 and not 0, and so on) and properly populates the input fields and updates the corresponding objects when loading and submiting the form respectively. I know how to do it directly with pure html code, but I'd like to know if it would be possible to get some advantage on using struts for this matter. I hope I could make myself clear. Thanks for any help. Jorge Mascena - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paging a collection property
Look at display tag in google. hth, .V Jorge Mascena wrote: I need some directions on how to use the struts html and/or neste taglibs to handle the case where there's a collection property of a form bean that may contain a big number of objects. In this case, I'd like to able to do some sort of paging on these objects and I'd like to know if struts have any support for that. For example: I have a form bean, AuthorFormBean, that has a collection of books he wrote. I can use the nested taglib to render the book collection, so the user can fill the books data from the same form he fills the rest of the data about the author. So far, so good. The problem (or question) is: what if the number of books gets too big and I want to split these books into pages (and have a navigator for those pages), but they still belong to the same form bean, so no matter which page the user is, the nested tags (nested:text, for example) will know the correct index of the objects we're talking about (if we're on page 2 and each page has 10 books, the nested tags will start getting the objects from index 9 and not 0, and so on) and properly populates the input fields and updates the corresponding objects when loading and submiting the form respectively. I know how to do it directly with pure html code, but I'd like to know if it would be possible to get some advantage on using struts for this matter. I hope I could make myself clear. Thanks for any help. Jorge Mascena - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: Paging a collection property
Sorry if I didn't explain the problem better. The pagination itself is ok (I've built a taglib that's equivalent to the one you pointed me). My question is how I can bind the input fields generated by the html and/or nested tags to the underlying objects so that any change the user makes to the input fields will be reflected on the properties of the corresponding books (to use the same example from the original message). Say the user is on page 2 and each page has 10 books. He changes the title of the first book of the page and submits the form. I want to know if struts will be smart enough to update the title of the 11th book and not the 1st book of the collection of books of the author. If so, what do I have to do to accomplish that? Thanks Jorge Mascena -Mensagem original- De: Vic Cekvenich [mailto:[EMAIL PROTECTED] Enviada em: Monday, March 24, 2003 3:22 PM Para: [EMAIL PROTECTED] Assunto: Re: Paging a collection property Look at display tag in google. hth, .V Jorge Mascena wrote: I need some directions on how to use the struts html and/or neste taglibs to handle the case where there's a collection property of a form bean that may contain a big number of objects. In this case, I'd like to able to do some sort of paging on these objects and I'd like to know if struts have any support for that. For example: I have a form bean, AuthorFormBean, that has a collection of books he wrote. I can use the nested taglib to render the book collection, so the user can fill the books data from the same form he fills the rest of the data about the author. So far, so good. The problem (or question) is: what if the number of books gets too big and I want to split these books into pages (and have a navigator for those pages), but they still belong to the same form bean, so no matter which page the user is, the nested tags (nested:text, for example) will know the correct index of the objects we're talking about (if we're on page 2 and each page has 10 books, the nested tags will start getting the objects from index 9 and not 0, and so on) and properly populates the input fields and updates the corresponding objects when loading and submiting the form respectively. I know how to do it directly with pure html code, but I'd like to know if it would be possible to get some advantage on using struts for this matter. I hope I could make myself clear. Thanks for any help. Jorge Mascena - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RES: Paging a collection property
Struts is very smart about multi row update (and tag uses indexed tag). But I have no idea how YOUR tag works, as far is iterator, is per page or over the collection. .V Jorge Mascena wrote: Sorry if I didn't explain the problem better. The pagination itself is ok (I've built a taglib that's equivalent to the one you pointed me). My question is how I can bind the input fields generated by the html and/or nested tags to the underlying objects so that any change the user makes to the input fields will be reflected on the properties of the corresponding books (to use the same example from the original message). Say the user is on page 2 and each page has 10 books. He changes the title of the first book of the page and submits the form. I want to know if struts will be smart enough to update the title of the 11th book and not the 1st book of the collection of books of the author. If so, what do I have to do to accomplish that? Thanks Jorge Mascena -Mensagem original- De: Vic Cekvenich [mailto:[EMAIL PROTECTED] Enviada em: Monday, March 24, 2003 3:22 PM Para: [EMAIL PROTECTED] Assunto: Re: Paging a collection property Look at display tag in google. hth, .V Jorge Mascena wrote: I need some directions on how to use the struts html and/or neste taglibs to handle the case where there's a collection property of a form bean that may contain a big number of objects. In this case, I'd like to able to do some sort of paging on these objects and I'd like to know if struts have any support for that. For example: I have a form bean, AuthorFormBean, that has a collection of books he wrote. I can use the nested taglib to render the book collection, so the user can fill the books data from the same form he fills the rest of the data about the author. So far, so good. The problem (or question) is: what if the number of books gets too big and I want to split these books into pages (and have a navigator for those pages), but they still belong to the same form bean, so no matter which page the user is, the nested tags (nested:text, for example) will know the correct index of the objects we're talking about (if we're on page 2 and each page has 10 books, the nested tags will start getting the objects from index 9 and not 0, and so on) and properly populates the input fields and updates the corresponding objects when loading and submiting the form respectively. I know how to do it directly with pure html code, but I'd like to know if it would be possible to get some advantage on using struts for this matter. I hope I could make myself clear. Thanks for any help. Jorge Mascena - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: RES: Paging a collection property
I figured it out. I was missing that you can iterate just a portion of a collection with nested:iterate (i.e., you can specify offset and length). This was the missing link. Thanks anyway. J -Mensagem original- De: Vic Cekvenich [mailto:[EMAIL PROTECTED] Enviada em: Monday, March 24, 2003 4:34 PM Para: [EMAIL PROTECTED] Assunto: Re: RES: Paging a collection property Struts is very smart about multi row update (and tag uses indexed tag). But I have no idea how YOUR tag works, as far is iterator, is per page or over the collection. .V Jorge Mascena wrote: Sorry if I didn't explain the problem better. The pagination itself is ok (I've built a taglib that's equivalent to the one you pointed me). My question is how I can bind the input fields generated by the html and/or nested tags to the underlying objects so that any change the user makes to the input fields will be reflected on the properties of the corresponding books (to use the same example from the original message). Say the user is on page 2 and each page has 10 books. He changes the title of the first book of the page and submits the form. I want to know if struts will be smart enough to update the title of the 11th book and not the 1st book of the collection of books of the author. If so, what do I have to do to accomplish that? Thanks Jorge Mascena -Mensagem original- De: Vic Cekvenich [mailto:[EMAIL PROTECTED] Enviada em: Monday, March 24, 2003 3:22 PM Para: [EMAIL PROTECTED] Assunto: Re: Paging a collection property Look at display tag in google. hth, .V Jorge Mascena wrote: I need some directions on how to use the struts html and/or neste taglibs to handle the case where there's a collection property of a form bean that may contain a big number of objects. In this case, I'd like to able to do some sort of paging on these objects and I'd like to know if struts have any support for that. For example: I have a form bean, AuthorFormBean, that has a collection of books he wrote. I can use the nested taglib to render the book collection, so the user can fill the books data from the same form he fills the rest of the data about the author. So far, so good. The problem (or question) is: what if the number of books gets too big and I want to split these books into pages (and have a navigator for those pages), but they still belong to the same form bean, so no matter which page the user is, the nested tags (nested:text, for example) will know the correct index of the objects we're talking about (if we're on page 2 and each page has 10 books, the nested tags will start getting the objects from index 9 and not 0, and so on) and properly populates the input fields and updates the corresponding objects when loading and submiting the form respectively. I know how to do it directly with pure html code, but I'd like to know if it would be possible to get some advantage on using struts for this matter. I hope I could make myself clear. Thanks for any help. Jorge Mascena - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Paging using struts
Does anyone have a good example of Paging using struts?? _ The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Paging using struts
Pat Quinn wrote: Does anyone have a good example of Paging using struts?? _ The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] . pager-taglib-1.1.jar Description: Binary data -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Paging using struts
http://jsptags.com/tags/navigation/pager/pager-demo.jsp Pat Quinn wrote: Does anyone have a good example of Paging using struts?? _ The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] . -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Paging using struts
I don't think struts has any paging functionality available out of the box. What you can do is looking into Sun's design pattern in the petstore codebase and learn from there. Basically, you can use JDBC like this stmt = conn.prepareStatement(sqlString, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY ); to archive what you want. Hope this helps -Original Message- From: Pat Quinn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 1:33 PM To: [EMAIL PROTECTED] Subject: Paging using struts Does anyone have a good example of Paging using struts?? _ The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Introducing the all new and improved continental.com. With a totally new personalized design, it's the best place to go. Before you go. Continental Airlines. Work Hard. Fly Right. http://www.continental.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Paging using struts
so far I never used it, but I read about it on this group and put it on my pending list: http://edhill.its.uiowa.edu/display-examples-0.8/example-paging.jsp -Original Message- From: Pat Quinn [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 14. Januar 2003 20:33 To: [EMAIL PROTECTED] Subject: Paging using struts Does anyone have a good example of Paging using struts?? _ The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Paging using struts
You can find more info about pager tag here: http://jsptags.com/tags/navigation/pager/index.jsp -Original Message- From: Pat Quinn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 2:33 PM To: [EMAIL PROTECTED] Subject: Paging using struts Does anyone have a good example of Paging using struts?? _ The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Checkbox column and paging.
I have a JSP table that contains a checkbox column used for multiple selection, which returns the selected item(s) Id value to a String array in my ActionForm bean. Happily, this is working. However, my problem is with paging. I am using the Display Tags to display my table, with a Decorator to show my checkbox in each row. The selected Id values that pass to my form bean are only the values on the current page of my table. Other items I have selected in the previous and next pages are not remembered and passed to the form bean array field. I need a little help following through with this, could someone please point me in the right direction? Is there a way to collect all the values on each page before submitting the form, so that all of the selected values are saved in the array? Will this require some sort of custom manipulation (not experienced with this) of the paging tags? Thank you, Susan Bradeen -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: About Paging
This exact problem was discussed about 2 weeks ago; have your searched the archive? Mark -Original Message- From: Kalaiselvan [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 1:42 AM Hii Craig, I have 1000 of records in my database. I want to show them in 10 per page. Now i'm using logic:iterator tagfor displaying the whole data in one page. Is there any option to get the paging in my jsp? Kalaiselvan.S - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 11, 2002 10:55 AM Subject: Re: Struts 1.1B2 with iplanet6Sp2 I don't use the iPlanet server directly myself much, but duplicate class definition sounds like you might have struts.jar on the classpath used to start the server, as well as being in your webapp. Make sure you start the server *without* this JAR in the classpath. Craig On Fri, 11 Oct 2002, Ziad Haidar wrote: Date: Fri, 11 Oct 2002 14:58:02 +1000 From: Ziad Haidar [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Struts 1.1B2 with iplanet6Sp2 Hi, I am trying to get Struts 1.1 B2 to work with I planet 6 Sp2. The first problem was getting exceptions from the commons-logging package. The only way to fix this was to use commons-logging.jar version 1.0.2 instead of the one in the download area. I am now getting the following exception when the ActionServelt is being initialised: vs(https-localhost)Exception thrown in servlet.init; context = /blank, servlet = 'action', servlet-class = 'org.apache.struts.action.ActionServlet', stack tace: java.lang.SecurityException: sealing violation at java.net.URLClassLoader.defineClass(URLClassLoader.java:234).. Every request after that to the ActionServlet gets the following Exception Unexpected error condition thrown (unknown exception,no description), stack: java.lang.LinkageError: duplicate class definition: org/apache/struts/action/ActionServlet at java.lang.ClassLoader.defineClass0(Native Method) In order to eliminate my code and projects settings, I deployed the jakarta-struts-1.1-b2-blank.war file to the web server. I get the same error with this file when the servlet is starting. ( ps I also had to replace the commons-logging.jar file as well). Any ideas or suggestions would be much appreciated. Regards, Ziad. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
About Paging
Hii Craig, I have 1000 of records in my database. I want to show them in 10 per page. Now i'm using logic:iterator tagfor displaying the whole data in one page. Is there any option to get the paging in my jsp? Kalaiselvan.S - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 11, 2002 10:55 AM Subject: Re: Struts 1.1B2 with iplanet6Sp2 I don't use the iPlanet server directly myself much, but duplicate class definition sounds like you might have struts.jar on the classpath used to start the server, as well as being in your webapp. Make sure you start the server *without* this JAR in the classpath. Craig On Fri, 11 Oct 2002, Ziad Haidar wrote: Date: Fri, 11 Oct 2002 14:58:02 +1000 From: Ziad Haidar [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Struts 1.1B2 with iplanet6Sp2 Hi, I am trying to get Struts 1.1 B2 to work with I planet 6 Sp2. The first problem was getting exceptions from the commons-logging package. The only way to fix this was to use commons-logging.jar version 1.0.2 instead of the one in the download area. I am now getting the following exception when the ActionServelt is being initialised: vs(https-localhost)Exception thrown in servlet.init; context = /blank, servlet = 'action', servlet-class = 'org.apache.struts.action.ActionServlet', stack tace: java.lang.SecurityException: sealing violation at java.net.URLClassLoader.defineClass(URLClassLoader.java:234).. Every request after that to the ActionServlet gets the following Exception Unexpected error condition thrown (unknown exception,no description), stack: java.lang.LinkageError: duplicate class definition: org/apache/struts/action/ActionServlet at java.lang.ClassLoader.defineClass0(Native Method) In order to eliminate my code and projects settings, I deployed the jakarta-struts-1.1-b2-blank.war file to the web server. I get the same error with this file when the servlet is starting. ( ps I also had to replace the commons-logging.jar file as well). Any ideas or suggestions would be much appreciated. Regards, Ziad. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: About Paging
http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=Struts+Paging http://nagoya.apache.org/eyebrowse/SearchList?listId=listName=struts-user%40jakarta.apache.orgsearchText=PagingdefaultField=subjectSearch=Search ... you probably already looked at all of those though - right? Kalaiselvan wrote: Hii Craig, I have 1000 of records in my database. I want to show them in 10 per page. Now i'm using logic:iterator tagfor displaying the whole data in one page. Is there any option to get the paging in my jsp? Kalaiselvan.S -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Any Idea about Paging Logic
Used the taglib a bit at my last gig, never noticed the behavior you're describing. One thing to note: The Collection the taglib sorts is stored in the session. Did both of your users happen to belong to the same session somehow? If so, then that's the behavior you would see. peace, Joe -Original Message- From: Brian Alexander Lee [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 06, 2002 7:42 PM To: Struts Users Mailing List Subject: Re: Any Idea about Paging Logic I looked at the display tag library: http://edhill.its.uiowa.edu/display/ Did I majorly screw something up or is this tag not thread safe? I noticed when I sorted a page of data, the next user to hit the page got that default sort. It was quite infuriating. I hope it was just me. BAL - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, October 06, 2002 2:32 AM Subject: Re: Any Idea about Paging Logic Is there any chance you've already searched the archive? I generally skip that and go to Google, myself. Tried that? http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=Struts+Paging There was a recent discussion on the list about paging that ... got pretty involved and contained some good suggestions. If all other avenues fail, search the archive within the last ... 2 weeks max I'd say. This is been a very, very discussed topic. Kalaiselvan wrote: Hii all, I'm using struts for my application. I have reterive data from DB and shown in table. Where i have thousands of records in my DB. So i want to show the data 100 for each page. I'm using logic:iterate tag for displaying the data. Where how can i seperate the data and how can implement my requirement. Any idea will be more helpful for me. Thanx in Advance, Kalaiselvan -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Any Idea about Paging Logic
Hi, here is tag lib which i am using in my project, and this taglib helps in getting results like google search enging http://jsptags.com/tags/navigation/pager/pager-taglib-1.1.html hope this helps Ashish --- Joe Barefoot [EMAIL PROTECTED] wrote: Used the taglib a bit at my last gig, never noticed the behavior you're describing. One thing to note: The Collection the taglib sorts is stored in the session. Did both of your users happen to belong to the same session somehow? If so, then that's the behavior you would see. peace, Joe -Original Message- From: Brian Alexander Lee [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 06, 2002 7:42 PM To: Struts Users Mailing List Subject: Re: Any Idea about Paging Logic I looked at the display tag library: http://edhill.its.uiowa.edu/display/ Did I majorly screw something up or is this tag not thread safe? I noticed when I sorted a page of data, the next user to hit the page got that default sort. It was quite infuriating. I hope it was just me. BAL - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, October 06, 2002 2:32 AM Subject: Re: Any Idea about Paging Logic Is there any chance you've already searched the archive? I generally skip that and go to Google, myself. Tried that? http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=Struts+Paging There was a recent discussion on the list about paging that ... got pretty involved and contained some good suggestions. If all other avenues fail, search the archive within the last ... 2 weeks max I'd say. This is been a very, very discussed topic. Kalaiselvan wrote: Hii all, I'm using struts for my application. I have reterive data from DB and shown in table. Where i have thousands of records in my DB. So i want to show the data 100 for each page. I'm using logic:iterate tag for displaying the data. Where how can i seperate the data and how can implement my requirement. Any idea will be more helpful for me. Thanx in Advance, Kalaiselvan -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = A$HI$H __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Any Idea about Paging Logic
Is there any chance you've already searched the archive? I generally skip that and go to Google, myself. Tried that? http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=Struts+Paging There was a recent discussion on the list about paging that ... got pretty involved and contained some good suggestions. If all other avenues fail, search the archive within the last ... 2 weeks max I'd say. This is been a very, very discussed topic. Kalaiselvan wrote: Hii all, I'm using struts for my application. I have reterive data from DB and shown in table. Where i have thousands of records in my DB. So i want to show the data 100 for each page. I'm using logic:iterate tag for displaying the data. Where how can i seperate the data and how can implement my requirement. Any idea will be more helpful for me. Thanx in Advance, Kalaiselvan -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Any Idea about Paging Logic
I looked at the display tag library: http://edhill.its.uiowa.edu/display/ Did I majorly screw something up or is this tag not thread safe? I noticed when I sorted a page of data, the next user to hit the page got that default sort. It was quite infuriating. I hope it was just me. BAL - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, October 06, 2002 2:32 AM Subject: Re: Any Idea about Paging Logic Is there any chance you've already searched the archive? I generally skip that and go to Google, myself. Tried that? http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=Struts+Paging There was a recent discussion on the list about paging that ... got pretty involved and contained some good suggestions. If all other avenues fail, search the archive within the last ... 2 weeks max I'd say. This is been a very, very discussed topic. Kalaiselvan wrote: Hii all, I'm using struts for my application. I have reterive data from DB and shown in table. Where i have thousands of records in my DB. So i want to show the data 100 for each page. I'm using logic:iterate tag for displaying the data. Where how can i seperate the data and how can implement my requirement. Any idea will be more helpful for me. Thanx in Advance, Kalaiselvan -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Any Idea about Paging Logic
Hii all, I'm using struts for my application. I have reterive data from DB and shown in table. Where i have thousands of records in my DB. So i want to show the data 100 for each page. I'm using logic:iterate tag for displaying the data. Where how can i seperate the data and how can implement my requirement. Any idea will be more helpful for me. Thanx in Advance, Kalaiselvan
RE: Struts tags for display a collection of views [paging design pattern]
Paging is the good term to describe what I want to do. I don't work directly with a dataset because I use an back-end application server that works on the database. So I receive a list of JavaBean that I would like to display in JSP pages. I found a little description of the paging pattern but I would like to know if someone has created an application with paging that use Struts tags (logic:iterate) or nested tags. You speak about the documentation but I think that an example allows to understand a documentation well. Sandra -Original Message- From: Taylor, Jason [mailto:[EMAIL PROTECTED]] Sent: 25 September 2002 16:31 To: 'Struts Users Mailing List' Subject: RE: Struts tags for display a collection of views I think you're talking about paging through a dataset a certain number of records at a time. If I'm right then we're talking about some sort of collection with a class or set of classes whose mission in life is to provide meta-data about the collection like Page 5 of 6, current selection is Record #34, etc. It's a pattern, though I'm not sure what you'd call it other than paging, though unfortunately paging makes people think of little electronic devices that annoy people automatically, so there should be a better word for it. Bottom line-- what you're talking about is something you could handle on the front end (in Javascript or some other scripting language) or the back end (in your Java classes that make up and service your Model), depending on your preferences/strengths. What Struts provides you is the framework for passing the data between the front and back end that shields you as much as possible from the details of how the servlet container works. Sometimes you'll get rather curt answers if it sounds like you're expecting Struts to provide features that are more high-level than that of a webapp framework. Don't take it personally, there are a *lot* of postings on this newsgroup, and most of them could be handled by the posters themselves if they simply read and understood the documentation more carefully. -JT -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 12:35 AM To: 'Struts Users Mailing List' Subject: RE: Struts tags for display a collection of views Excuse me I do not understand the direction of your answer. I already read documentation about tags offered by struts. For displaying a list of objects it seems that there are two possible choices logic:iterate and nested tags. The problem that I meet today in the construction of my page to displaying data several similar sights seemed me common. This is why I sought of the assistance on this forum. I find interessant very to be able to exchange our knowledge, and our experiments that makes it possible to reduce times of development considerably. I know that the tutoriaux ones and documentation exist but the examples given are often simple. On the other hand the users of Struts like you and me, build more complex cases. Sandra, -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: 24 September 2002 19:10 To: 'Struts Users Mailing List' Subject: RE: Struts tags for display a collection of views This would require a tutorial (or two). I would suggest you do one, then ask a question. Mark -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 12:10 PM Hi, I don't know HTML/Struts tags very well, I would like to know if it is possible to display this kind of view: Previous | | Next | | | (body) | | | In fact I have to display a list that can have a large size and multiple views are required. The buttons Previous and next all to navigate from one view to another. Could you explain me how this type of views is managed ? Thanks a lot -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Result paging for site search results
Thanks, Joe, for alerting the list to this display taglib--I just looked at the link you provided--it looks very professional/displays very well. Glen -Original Message- From: Joe Barefoot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 2:03 PM To: Struts Users Mailing List Subject: RE: Result paging for site search results Simon, I'm not sure if you are handling very large ResultSets and need database-aware paging (i.e., user clicks next, and the next 25 results are fetched from DB, vs. having them all in a Collection that you are paging through in-memory). If you aren't handling very large volumes, I suggest you check out the very savvy display taglib (link below). If you may be handling large volumes in the future (but not right now), it can easily be replaced later with a custom paging implementation. It works well in conjunction with Struts; basically, you just stuff your Collection into the request, and the tag uses Struts-like syntax plus the commons utilities to access properties of the objects in your collection. Sorting and paging are supported (and style classes), and you can add dynamic output to table rows using a TableDecorator class that uses the Decorator pattern to 'massage' data from your Collection objects. Very simple, and very well documented w/ examples, JSP source, etc. http://edhill.its.uiowa.edu/display/ peace, Joe -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 10:49 AM To: 'Struts Users Mailing List' Subject: RE: Result paging for site search results This very topic was discussed at length just a couple of days ago. Check the archives: http://www.mail-archive.com/struts-user%40jakarta.apache.org/ Mark -Original Message- From: simon.o'[EMAIL PROTECTED] [mailto:simon.o'[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 12:59 PM To: Struts Users Mailing List Subject: Result paging for site search results All I am a newbie so if this question sounds a bit simple don't shoot... I am developing a search page and want to break the results into pages of containg 25 results per page. I know I can use the offset and length parameters on the iterator tag but I can't seem to be able to pass the formBean maintaining the results data to the next page.. any ideas Thanks in advance. Simon. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Result paging for site search results
Ditto, I just checked this out and wish I'd known about it sooner! -Original Message- From: Mazza, Glen R, PERSCOM [mailto:[EMAIL PROTECTED]] Sent: August 28, 2002 7:28 AM To: 'Joe Barefoot'; Struts Users Mailing List Subject: RE: Result paging for site search results Thanks, Joe, for alerting the list to this display taglib--I just looked at the link you provided--it looks very professional/displays very well. Glen -Original Message- From: Joe Barefoot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 2:03 PM To: Struts Users Mailing List Subject: RE: Result paging for site search results Simon, I'm not sure if you are handling very large ResultSets and need database-aware paging (i.e., user clicks next, and the next 25 results are fetched from DB, vs. having them all in a Collection that you are paging through in-memory). If you aren't handling very large volumes, I suggest you check out the very savvy display taglib (link below). If you may be handling large volumes in the future (but not right now), it can easily be replaced later with a custom paging implementation. It works well in conjunction with Struts; basically, you just stuff your Collection into the request, and the tag uses Struts-like syntax plus the commons utilities to access properties of the objects in your collection. Sorting and paging are supported (and style classes), and you can add dynamic output to table rows using a TableDecorator class that uses the Decorator pattern to 'massage' data from your Collection objects. Very simple, and very well documented w/ examples, JSP source, etc. http://edhill.its.uiowa.edu/display/ peace, Joe -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 10:49 AM To: 'Struts Users Mailing List' Subject: RE: Result paging for site search results This very topic was discussed at length just a couple of days ago. Check the archives: http://www.mail-archive.com/struts-user%40jakarta.apache.org/ Mark -Original Message- From: simon.o'[EMAIL PROTECTED] [mailto:simon.o'[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 12:59 PM To: Struts Users Mailing List Subject: Result paging for site search results All I am a newbie so if this question sounds a bit simple don't shoot... I am developing a search page and want to break the results into pages of containg 25 results per page. I know I can use the offset and length parameters on the iterator tag but I can't seem to be able to pass the formBean maintaining the results data to the next page.. any ideas Thanks in advance. Simon. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Result paging for site search results
All I am a newbie so if this question sounds a bit simple don't shoot... I am developing a search page and want to break the results into pages of containg 25 results per page. I know I can use the offset and length parameters on the iterator tag but I can't seem to be able to pass the formBean maintaining the results data to the next page.. any ideas Thanks in advance. Simon. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Result paging for site search results
I wouldn't send around ResultSets. Use scrollable cursors if your JDBC driver supports them and do an absolute() to go to the row you need. thats one way Michael Lee - Original Message - From: simon.o'[EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 27, 2002 12:58 PM Subject: Result paging for site search results All I am a newbie so if this question sounds a bit simple don't shoot... I am developing a search page and want to break the results into pages of containg 25 results per page. I know I can use the offset and length parameters on the iterator tag but I can't seem to be able to pass the formBean maintaining the results data to the next page.. any ideas Thanks in advance. Simon. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Result paging for site search results
This very topic was discussed at length just a couple of days ago. Check the archives: http://www.mail-archive.com/struts-user%40jakarta.apache.org/ Mark -Original Message- From: simon.o'[EMAIL PROTECTED] [mailto:simon.o'[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 12:59 PM To: Struts Users Mailing List Subject: Result paging for site search results All I am a newbie so if this question sounds a bit simple don't shoot... I am developing a search page and want to break the results into pages of containg 25 results per page. I know I can use the offset and length parameters on the iterator tag but I can't seem to be able to pass the formBean maintaining the results data to the next page.. any ideas Thanks in advance. Simon. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Result paging for site search results
Simon, I'm not sure if you are handling very large ResultSets and need database-aware paging (i.e., user clicks next, and the next 25 results are fetched from DB, vs. having them all in a Collection that you are paging through in-memory). If you aren't handling very large volumes, I suggest you check out the very savvy display taglib (link below). If you may be handling large volumes in the future (but not right now), it can easily be replaced later with a custom paging implementation. It works well in conjunction with Struts; basically, you just stuff your Collection into the request, and the tag uses Struts-like syntax plus the commons utilities to access properties of the objects in your collection. Sorting and paging are supported (and style classes), and you can add dynamic output to table rows using a TableDecorator class that uses the Decorator pattern to 'massage' data from your Collection objects. Very simple, and very well documented w/ examples, JSP source, etc. http://edhill.its.uiowa.edu/display/ peace, Joe -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 10:49 AM To: 'Struts Users Mailing List' Subject: RE: Result paging for site search results This very topic was discussed at length just a couple of days ago. Check the archives: http://www.mail-archive.com/struts-user%40jakarta.apache.org/ Mark -Original Message- From: simon.o'[EMAIL PROTECTED] [mailto:simon.o'[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 12:59 PM To: Struts Users Mailing List Subject: Result paging for site search results All I am a newbie so if this question sounds a bit simple don't shoot... I am developing a search page and want to break the results into pages of containg 25 results per page. I know I can use the offset and length parameters on the iterator tag but I can't seem to be able to pass the formBean maintaining the results data to the next page.. any ideas Thanks in advance. Simon. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to implement paging in Struts?
I was searching the archive and come up empty with regarding to the paging functionality in struts. Some people mentioned the Jsptags.com's paging tags. The problem is this tag is that it puts a big collection of result data in the session. It may have a scalability problem. Sun's blueprints also mentioned the page-by-page pattern but the implementation causes me problem because I am using sql server 2000 jdbc driver, which does not support the resultSet.absolute method. Thanks, Hai
RE: paging taglib and struts?
Malcolm I've been reading throughthe documentation for the taglib, and I'm getting the impression that the collectionof things I'm interating over has to exist in it's entirety in server memory. Is that true? This is slightly problematic for me because it's a large collection of data (I know, I should push back on the user...it's along story) My questions are 1. how does it know what the collection is that I'm iterating through 2. what are you using the pg:param name=action value=search/ for? currently ,y I've included my jsp for reference... Any help is appreciated. John Mattos Sr. Developer and Architect iNDEMAND 345 Hudson St. 16th Floor New York, New York 10014 --- My JSP--- pg:pager TABLE border=1 TBODYtr th colspan=13 align=centerView Valid Transactions/th/tr TR TR ThType/Th ThStatus/Th ThOrg Id/Th ThOrg Name/Th ThChannel/Th ThProduct Title/Th ThSignal Type/Th ThEvent #/Th ThDeal/Th ThRetail/Th ThBuys/Th ThAmount Due/Th ThPost Date/Th /TR pg:item logic:iterate id=buyTransaction type=com.indemand.indab.application.invoice.BuyTransaction collection=%=valids% TR TD ALIGN=LEFT%=buyTransaction.getType()%nbsp;/TD TD ALIGN=LEFT%=buyTransaction.getStatus()%nbsp;/TD TD ALIGN=RIGHT%=buyTransaction.getOrgId()%/TD TD ALIGN=LEFT%=buyTransaction.getAffiliateFullName().trim()%nbsp;/TD TD ALIGN=RIGHT%=buyTransaction.getChannel()%nbsp;/TD TD ALIGN=LEFT%=buyTransaction.getAssetTitle()%nbsp;/TD TD ALIGN=CENTER%=buyTransaction.getTiertype()%nbsp;/TD TD ALIGN=RIGHT%=buyTransaction.getIndAsstId()%nbsp;/TD TD ALIGN=RIGHT%=buyTransaction.getDealTerm()%nbsp;/TD TD ALIGN=RIGHT$%=buyTransaction.getTransAmt()%nbsp;/TD TD ALIGN=RIGHT%=buyTransaction.getBuys()%nbsp;/TD TD ALIGN=RIGHT$%=buyTransaction.getTotalTransAmt()%/TD TD ALIGN=CENTER%=buyTransaction.getPostDate()%nbsp;/TD /TR /logic:iterate /pg:item TR TD colspan=13 Align=centernbsp; pg:index pg:prev a href=%= pageUrl %[ (%= pageNumber %) Previous ]/a /pg:prev pg:pages a href=%= pageUrl %%= pageNumber %/a /pg:pages pg:next a href=%= pageUrl %[ Next (%= pageNumber %) ]/a /pg:next /pg:index /pg:pager /TD /TR /table --- END --- -Original Message- From: Malcolm Wise [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 4:32 AM To: 'Struts Users Mailing List' Subject: RE: paging taglib and struts? John, I am using this taglib quite extensively and it works very well with Struts. Below is a fairly basic example jsp. Essentially, the pager url attribute specifies the destination when any of the navigation links is clicked. Request parameters required by the action class can be specified using the param tag. These can be literals (value=search) as in my example or use bean:define and specify the value attribute as the resulting variable (value=%=expr%). The item tag defines each row to be displayed, and needs to be enclosed within logic:iterate. The index tag defines the navigation bar (prev, next etc) as a series of hyperlinks. The maxIndexPages attribute of the pager tag defines how many page numbers will be displayed in the navigation bar, i.e the below example will display [Prev] 1 2 3 4 5 6 7 8 9 10 [Next] assuming there are 10 pages worth of data. [Prev] and [Next] only display if there are previous or more pages. The maxPageItems attribute specifies how many detail rows per page to be displayed. I'm happy to answer any further questions or give examples. Cheers Malc pg:pager url=AdvancedSearch.do maxIndexPages=10 maxPageItems=15 pg:param name=action value=search/ TABLE width=100% TR TD align=center TABLE width=60% border=0 TR TH width=10%bean:message key=partnum.ecnsearchresults.ecnid//TH TH width=20%bean:message key=partnum.ecnsearchresults.model//TH TH width=10%bean:message key=partnum.ecnsearchresults.releasedate//TH TH width=10%bean:message key=partnum.ecnsearchresults.status//TH /TR logic:iterate id=row name=results scope=request type
RE: paging taglib and struts?
You would need to calculate the total number of rows which are to be displayed and put this into the request/session for the jsp to use. Thanks for the tip. The pager docs don't actually say this it is sorta assumed. Docs could be alot better. -Original Message- From: Malcolm Wise [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 06, 2002 9:31 AM To: 'Struts Users Mailing List' Subject: RE: paging taglib and struts? Pedro, (Posted here 'cos I couldn't get through to your email address.) Refer to the taglib documentation at http://jsptags.com/tags/navigation/pager/pager-taglib-1.1.html I think you would have to do some arithmetic in your Action class and put the results into the request/session to achieve this. The 'pager' tag makes available a pagerPageNumber variable which is the page number of the current page. Internally the tag library classes must know how many rows and pages there are, but it does not expose these to the jsp as far as I can see. You would need to calculate the total number of rows which are to be displayed and put this into the request/session for the jsp to use. So, to get the total number of pages you would need to work out the no. of rows to display divided by the value specified for the maxPageItems attribute of the 'pager' tag (+1 if there is a remainder). The pagerOffset variable exposed by the 'pager' tag can be used to calculate the Results 1 to 10 part of your requirement (pagerOffset +1 to pagerOffset+maxPageItems, unless this is the last page, in which case it would be pagerOffset +1 to total no. of rows). Another option would be to ask the author (James Klicman, I believe - [EMAIL PROTECTED]) to modify the tag classes to expose the variables you need ( I don't think this library is open source). HTH Malc -Original Message- From: Pedro Marques [mailto:[EMAIL PROTECTED]] Sent: 05 February 2002 22:15 To: [EMAIL PROTECTED] Subject: RE: paging taglib and struts? Malcolm, Is it possible to get the total number of pages? I would like a navigation bar like this: Results 1 to 10 out of 1036page 1/20 thanks, Pedro. -Original Message- From: Malcolm Wise [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 1:32 AM To: 'Struts Users Mailing List' Subject: RE: paging taglib and struts? John, I am using this taglib quite extensively and it works very well with Struts. Below is a fairly basic example jsp. Essentially, the pager url attribute specifies the destination when any of the navigation links is clicked. Request parameters required by the action class can be specified using the param tag. These can be literals (value=search) as in my example or use bean:define and specify the value attribute as the resulting variable (value=%=expr%). The item tag defines each row to be displayed, and needs to be enclosed within logic:iterate. The index tag defines the navigation bar (prev, next etc) as a series of hyperlinks. The maxIndexPages attribute of the pager tag defines how many page numbers will be displayed in the navigation bar, i.e the below example will display [Prev] 1 2 3 4 5 6 7 8 9 10 [Next] assuming there are 10 pages worth of data. [Prev] and [Next] only display if there are previous or more pages. The maxPageItems attribute specifies how many detail rows per page to be displayed. I'm happy to answer any further questions or give examples. Cheers Malc pg:pager url=AdvancedSearch.do maxIndexPages=10 maxPageItems=15 pg:param name=action value=search/ TABLE width=100% TR TD align=center TABLE width=60% border=0 TR TH width=10%bean:message key=partnum.ecnsearchresults.ecnid//TH TH width=20%bean:message key=partnum.ecnsearchresults.model//TH TH width=10%bean:message key=partnum.ecnsearchresults.releasedate//TH TH width=10%bean:message key=partnum.ecnsearchresults.status//TH /TR logic:iterate id=row name=results scope=request type=com.sony.sde.sql.Row pg:item TR TDbean:write name=row property=string[1]//TD TDbean:write name=row property=string[2]//TD TDbean:write name=row property=string[3]//TD TDbean:write name=row property=string[4]//TD /TR /pg:item /logic:iterate /TABLE TABLE width=60% border=0 TRTDnbsp;/TD/TR TR align=center TD pg:index pg:preva href=%=pageUrl%[ Prev]/a /pg:prev pg:pages bean:define id=pageNo value=%=pagerPageNumber.toString()%/ logic:equal name=pageNo value=%=pageNumber.toString()% %=pageNumber% /logic:equal
RE: paging taglib and struts?
John, I am using this taglib quite extensively and it works very well with Struts. Below is a fairly basic example jsp. Essentially, the pager url attribute specifies the destination when any of the navigation links is clicked. Request parameters required by the action class can be specified using the param tag. These can be literals (value=search) as in my example or use bean:define and specify the value attribute as the resulting variable (value=%=expr%). The item tag defines each row to be displayed, and needs to be enclosed within logic:iterate. The index tag defines the navigation bar (prev, next etc) as a series of hyperlinks. The maxIndexPages attribute of the pager tag defines how many page numbers will be displayed in the navigation bar, i.e the below example will display [Prev] 1 2 3 4 5 6 7 8 9 10 [Next] assuming there are 10 pages worth of data. [Prev] and [Next] only display if there are previous or more pages. The maxPageItems attribute specifies how many detail rows per page to be displayed. I'm happy to answer any further questions or give examples. Cheers Malc pg:pager url=AdvancedSearch.do maxIndexPages=10 maxPageItems=15 pg:param name=action value=search/ TABLE width=100% TR TD align=center TABLE width=60% border=0 TR TH width=10%bean:message key=partnum.ecnsearchresults.ecnid//TH TH width=20%bean:message key=partnum.ecnsearchresults.model//TH TH width=10%bean:message key=partnum.ecnsearchresults.releasedate//TH TH width=10%bean:message key=partnum.ecnsearchresults.status//TH /TR logic:iterate id=row name=results scope=request type=com.sony.sde.sql.Row pg:item TR TDbean:write name=row property=string[1]//TD TDbean:write name=row property=string[2]//TD TDbean:write name=row property=string[3]//TD TDbean:write name=row property=string[4]//TD /TR /pg:item /logic:iterate /TABLE TABLE width=60% border=0 TRTDnbsp;/TD/TR TR align=center TD pg:index pg:preva href=%=pageUrl%[ Prev]/a /pg:prev pg:pages bean:define id=pageNo value=%=pagerPageNumber.toString()%/ logic:equal name=pageNo value=%=pageNumber.toString()% %=pageNumber% /logic:equal logic:notEqual name=pageNo value=%=pageNumber.toString()% a href=%= pageUrl %%= pageNumber %/a /logic:notEqual /pg:pages pg:nexta href=%= pageUrl %[Next ]/a /pg:next /pg:index /TD /TR /TABLE /TD /TR /TABLE /pg:pager -Original Message- From: John Menke [mailto:[EMAIL PROTECTED]] Sent: 03 March 2002 02:08 To: struts-user Subject: paging taglib and struts? Does anyone any suggestions for implementing paging with struts? I have searched the archive and karl basel posted this: snip There's a good pager taglib at jsptags.com. I've used it in a struts app and does the job quite well when embedded in the iterate tags. logic:iterate pg:item Item Details /pg:item /logic:iterate snip I have downloaded this pager and the documentation is not providing enough information on how this works. Are there any examples out there on how to do this that I am missing? -john -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] * The information contained in this message or any of its attachments may be privileged and confidential and intended for the exclusive use of the addressee. If you are not the addressee any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
paging taglib and struts?
Does anyone any suggestions for implementing paging with struts? I have searched the archive and karl basel posted this: snip There's a good pager taglib at jsptags.com. I've used it in a struts app and does the job quite well when embedded in the iterate tags. logic:iterate pg:item Item Details /pg:item /logic:iterate snip I have downloaded this pager and the documentation is not providing enough information on how this works. Are there any examples out there on how to do this that I am missing? -john -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: paging for web application
On Wed, 31 Jan 2001, Peter Alfors wrote: check out the pager taglib: http://jsptags.com/tags/navigation/pager/ Very handy! For anyone else looking at this for paging long-winded result sets, and using Tomcat 4.0-b1, I needed to edit the demo "pager-demo.jsp" and change: pg:pager maxIndexPages="%= 20 %" to: pg:pager maxIndexPages="20" This fixes a hack put in to convert "20" to an int as delineated in the pager troubleshooting section.
Re: paging for web application
On Wed, 31 Jan 2001, Peter Alfors wrote: check out the pager taglib: http://jsptags.com/tags/navigation/pager/ Actually, I can run the example that comes with the distribution but am having some problems using this pager taglib in Struts. The links created by the pager aren't working. The example I'm working on has a JSP with an embedded form that, upon submission, invokes a database query and reads back the results stored in request scope beans (to the same JSP). The pager creates the correct number of links to result pages. For example, one link created is: http://localhost/project/simpleQuery.jsp?pager.offset=1 But when I click on this link I only get my simple query form and the pager output of: Result Pages [Prev] 1 but no other results. I've also tried typing in the URL: http://localhost/project/simpleQuery.do?pager.offset=1 with the same result (or lack there-of). Ideas? Any help is appreciated! Sorry if this is off-topic for Struts.
Re: paging for web application
On Mon, 12 Feb 2001, Steve A Drake wrote: On Wed, 31 Jan 2001, Peter Alfors wrote: check out the pager taglib: http://jsptags.com/tags/navigation/pager/ Actually, I can run the example that comes with the distribution but am having some problems using this pager taglib in Struts. The links created by the pager aren't working. Well, I did get this working but with a couple of major caveats. 1) In order to define a given pg:index, I had to use scriptlets for all the code between the start and end tag. I assume this is because - from what someone enlightened me earlier with - you can't nest tags. I hope I'm wrong about this because it significantly clutters up the JSP and renders all the bean tags unusable. =:| 2) I needed to locate the hypertext index at the bottom of the document because the index dimensions are determined as the results are iterated. I assume this could be fixed by buffering the output to a StringBuffer or somesuch but havn't tried that yet. If anyone has some usage suggestions for this pager taglib, I'd appreciate your input.
Re: paging for web application
Misak, I've found the pager tag that James over at http://www.jsptags.com has developed is quite powerful and usable. I've used it in some prototypes using Struts and Tomcat. One of my colleagues attempted to get it to work under Weblogic without much luck, but we didn't spend much time on it. Now I'm just waiting for him to make the taglib that generates his menu available :-) Here's the link http://jsptags.com/tags/navigation/pager This topic does beg the question whether Struts should have its own paging tags... I suspect you can probably implement paging with the standard logic and iteration tags though... Regards, James W. -- This e-mail is from Cards Etc Pty Ltd (ACN: 069 533 302). It may contain privileged and confidential information. It is intended for the named recipient(s) only. If you are not an intended recipient, please notify us immediately by reply e-mail or by phone on +61 2 9212 7773 delete this e-mail from your system. --
Re: paging for web application
check out the pager taglib: http://jsptags.com/tags/navigation/pager/ "Boulatian, Misak" wrote: Hi alI, I am trying to implement paging for web application. The query may return over thousand records and it is a bad idea to dump all of those to the client. I was thinking to feed only 50 records at a time and have client to click for next or previous page. We are using struts with EJBs. Our action classes call session EJBs, which return information as a javabean. Does anyone have any ideas or done anything with struts in regards to paging (it may not even have to do anything with struts). I appreciate any responses. Thanks, Misak begin:vcard n:; x-mozilla-html:FALSE org:BRIMG SRC="http://www.irista.com/logo/irista.gif"BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain adr:;; version:2.1 end:vcard