RE: Pagination using Struts library
> -Original Message- > From: Pankaj Gupta [mailto:pankaj.hug...@gmail.com] > Sent: Thursday, May 19, 2011 10:12 > To: Struts Users Mailing List > Subject: Re: Pagination using Struts library > > Hi Dave, > > Just need quick help. > Is display tag supported for struts1.2. > http://www.displaytag.org/1.2/ is niether unsuported or supported, is is a JSP tag library not associated with Struts. To answer if it can be used, yes I have used it in struts 1 and struts 2. > > Thanks, > Pankaj > > On Wed, May 11, 2011 at 5:36 PM, Dave Newton > wrote: > > > There isn't any; Struts is largely front-end neutral. Check > the jQuery > > plugin, otherwise your best bet is to use any of the myriad > pagination > > libs. > > > > DisplayTag is open-source, BTW. > > > > Dave > > On May 11, 2011 7:48 AM, "Pankaj Gupta" > wrote: > > > Hi, > > > > > > But I am looking for Pagination in Struts framework specifically. > > > > > > Thanks, > > > Pankaj > > > > > > > > > > > > > > > > > > > > > On Wed, May 11, 2011 at 3:51 PM, Kushan Jayathilake > > > > >wrote: > > > > > >> Well.. if you are going with JSF, there are tags with pagination > > >> support builtin. > > >> you just need to pass the collection and the page size for that > > >> > > >> On Wed, May 11, 2011 at 3:25 PM, Pankaj Gupta > > >> > >> >wrote: > > >> > > >> > Hi All, > > >> > > > >> > Is there any way Jaakata /SUN library or any api in > struts which > > >> > can > > be > > >> > used > > >> > to > > >> > implement pagination. > > >> > > > >> > > > >> > I suggested Display tag and Page Loader, but since > they are not > > >> > open source, not ssociated with Jakarta/Sun, user is not > > >> > agreeging to it? > > >> > > > >> > > > >> > Any suggestions would be appreciated? > > >> > > > >> > > > >> > Thanks, > > >> > Pankaj > > >> > > > >> > > >> > > >> > > >> -- > > >> Regards > > >> Kushan Jayathilake > > >> > > > -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination using Struts library
Hi Dave, Just need quick help. Is display tag supported for struts1.2. Thanks, Pankaj On Wed, May 11, 2011 at 5:36 PM, Dave Newton wrote: > There isn't any; Struts is largely front-end neutral. Check the jQuery > plugin, otherwise your best bet is to use any of the myriad pagination > libs. > > DisplayTag is open-source, BTW. > > Dave > On May 11, 2011 7:48 AM, "Pankaj Gupta" wrote: > > Hi, > > > > But I am looking for Pagination in Struts framework specifically. > > > > Thanks, > > Pankaj > > > > > > > > > > > > > > On Wed, May 11, 2011 at 3:51 PM, Kushan Jayathilake >wrote: > > > >> Well.. if you are going with JSF, there are tags with pagination support > >> builtin. > >> you just need to pass the collection and the page size for that > >> > >> On Wed, May 11, 2011 at 3:25 PM, Pankaj Gupta >> >wrote: > >> > >> > Hi All, > >> > > >> > Is there any way Jaakata /SUN library or any api in struts which can > be > >> > used > >> > to > >> > implement pagination. > >> > > >> > > >> > I suggested Display tag and Page Loader, but since they are not open > >> > source, > >> > not ssociated with Jakarta/Sun, user is not agreeging to it? > >> > > >> > > >> > Any suggestions would be appreciated? > >> > > >> > > >> > Thanks, > >> > Pankaj > >> > > >> > >> > >> > >> -- > >> Regards > >> Kushan Jayathilake > >> >
Re: Pagination using Struts library
Recently when I tried the jQuery Grid from the website it is not able to edit the grid. Seems like there is some problem. I have posted the same in the forum. Dont know it has been fixed or not. Try this below url. http://www.weinfreund.de/struts2-jquery-grid-showcase/index.action -- View this message in context: http://struts.1045723.n5.nabble.com/Pagination-using-Struts-library-tp4386974p4408918.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination using Struts library
You'll need to make some mods for displaytag to work with S2. 1. You'll need to add an acceptableParameterName method to your classes, we just add it to our base class. 2. You have to add the Displaytag responseOverrideFilter to your web.xml for the export to work Having said all that, we are moving away from display tag and to jQuery Datatables. Honestly our life has become so much easier since we started incorporating more client side javascript. The code is easier to follow, ajax calls make security a breeze and the server load is considerably lighter. Z. On 14/05/11 12:04 AM, "Miguel" wrote: >Speaking of which, Dave, have you used displaytag recently? > >It seems to have been abandoned. It's good for regular usage, but as >time goes by we start having some problems. > >For example, with the export options (displaytag can export to excel, >pdf, etc automatically) we see a ognl WARN: > >WARN [CommonsLogger.java:60] : Error setting expression '6578706f7274' >with value '[Ljava.lang.String;@385b5df0' >ognl.ExpressionSyntaxException: Malformed OGNL expression: 6578706f7274 >[ognl.ParseException: Encountered " "7274 "" at line 1, >column 9. > >This is due to the fact that displaytag's export url is >Someaction.action?6578706f7274=1&d-16533-e=5 and 6578706f7274 doesn't >seem to be valid on recent versions. > >Miguel Almeida > > >Dave,On Wed, 2011-05-11 at 08:06 -0400, Dave Newton wrote: > >> >> DisplayTag is open-source, BTW. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination using Struts library
displaytag1.2 + struts2 + tiles works good for me. displaytag is a very good tool for pagination. http://www.displaytag.org/1.2/ Another paging feature I found just recently is: DataTables http://www.datatables.net/index The online doc shows good features, but I have not done production app based on it yet. while for displaytag, I do use it a lot with struts2 + displaytag + tiles. Displaytag does good with paging for struts2. Emi On 05/11/2011 07:47 AM, Pankaj Gupta wrote: Hi, But I am looking for Pagination in Struts framework specifically. Thanks, Pankaj On Wed, May 11, 2011 at 3:51 PM, Kushan Jayathilakewrote: Well.. if you are going with JSF, there are tags with pagination support builtin. you just need to pass the collection and the page size for that On Wed, May 11, 2011 at 3:25 PM, Pankaj Gupta wrote: Hi All, Is there any way Jaakata /SUN library or any api in struts which can be used to implement pagination. I suggested Display tag and Page Loader, but since they are not open source, not ssociated with Jakarta/Sun, user is not agreeging to it? Any suggestions would be appreciated? Thanks, Pankaj -- Regards Kushan Jayathilake -- Emi Lu, ENCS, Concordia University, Montreal H3G 1M8 em...@encs.concordia.ca+1 514 848-2424 x5884 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination using Struts library
displaytag1.2 + struts2 + tiles works good for me. displaytag is a very good tool for pagination. http://www.displaytag.org/1.2/ Emi On 05/11/2011 07:47 AM, Pankaj Gupta wrote: Hi, But I am looking for Pagination in Struts framework specifically. Thanks, Pankaj On Wed, May 11, 2011 at 3:51 PM, Kushan Jayathilakewrote: Well.. if you are going with JSF, there are tags with pagination support builtin. you just need to pass the collection and the page size for that On Wed, May 11, 2011 at 3:25 PM, Pankaj Gupta wrote: Hi All, Is there any way Jaakata /SUN library or any api in struts which can be used to implement pagination. I suggested Display tag and Page Loader, but since they are not open source, not ssociated with Jakarta/Sun, user is not agreeging to it? Any suggestions would be appreciated? Thanks, Pankaj -- Regards Kushan Jayathilake -- Emi Lu, ENCS, Concordia University, Montreal H3G 1M8 em...@encs.concordia.ca+1 514 848-2424 x5884 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination using Struts library
On Fri, May 13, 2011 at 10:04 AM, Miguel wrote: > Speaking of which, Dave, have you used displaytag recently? I've never used it at all. > This is due to the fact that displaytag's export url is > Someaction.action?6578706f7274=1&d-16533-e=5 and 6578706f7274 doesn't > seem to be valid on recent versions. OGNL expects valid property names, things starting with numbers aren't valid Java property names. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination using Struts library
Speaking of which, Dave, have you used displaytag recently? It seems to have been abandoned. It's good for regular usage, but as time goes by we start having some problems. For example, with the export options (displaytag can export to excel, pdf, etc automatically) we see a ognl WARN: WARN [CommonsLogger.java:60] : Error setting expression '6578706f7274' with value '[Ljava.lang.String;@385b5df0' ognl.ExpressionSyntaxException: Malformed OGNL expression: 6578706f7274 [ognl.ParseException: Encountered " "7274 "" at line 1, column 9. This is due to the fact that displaytag's export url is Someaction.action?6578706f7274=1&d-16533-e=5 and 6578706f7274 doesn't seem to be valid on recent versions. Miguel Almeida Dave,On Wed, 2011-05-11 at 08:06 -0400, Dave Newton wrote: > > DisplayTag is open-source, BTW.
Re: Pagination using Struts library
You have struts 2 jquery plugin for grid and full hibernate support plugin to do pagination. With Best Regards, Amol Ghotankar Technical Lead Cursive Technologies Pvt. Ltd. www.cursivetech.com
Re: Pagination using Struts library
There isn't any; Struts is largely front-end neutral. Check the jQuery plugin, otherwise your best bet is to use any of the myriad pagination libs. DisplayTag is open-source, BTW. Dave On May 11, 2011 7:48 AM, "Pankaj Gupta" wrote: > Hi, > > But I am looking for Pagination in Struts framework specifically. > > Thanks, > Pankaj > > > > > > > On Wed, May 11, 2011 at 3:51 PM, Kushan Jayathilake wrote: > >> Well.. if you are going with JSF, there are tags with pagination support >> builtin. >> you just need to pass the collection and the page size for that >> >> On Wed, May 11, 2011 at 3:25 PM, Pankaj Gupta > >wrote: >> >> > Hi All, >> > >> > Is there any way Jaakata /SUN library or any api in struts which can be >> > used >> > to >> > implement pagination. >> > >> > >> > I suggested Display tag and Page Loader, but since they are not open >> > source, >> > not ssociated with Jakarta/Sun, user is not agreeging to it? >> > >> > >> > Any suggestions would be appreciated? >> > >> > >> > Thanks, >> > Pankaj >> > >> >> >> >> -- >> Regards >> Kushan Jayathilake >>
Re: Pagination using Struts library
Hi, But I am looking for Pagination in Struts framework specifically. Thanks, Pankaj On Wed, May 11, 2011 at 3:51 PM, Kushan Jayathilake wrote: > Well.. if you are going with JSF, there are tags with pagination support > builtin. > you just need to pass the collection and the page size for that > > On Wed, May 11, 2011 at 3:25 PM, Pankaj Gupta >wrote: > > > Hi All, > > > > Is there any way Jaakata /SUN library or any api in struts which can be > > used > > to > > implement pagination. > > > > > > I suggested Display tag and Page Loader, but since they are not open > > source, > > not ssociated with Jakarta/Sun, user is not agreeging to it? > > > > > > Any suggestions would be appreciated? > > > > > > Thanks, > > Pankaj > > > > > > -- > Regards > Kushan Jayathilake >
Re: Pagination using Struts library
Well.. if you are going with JSF, there are tags with pagination support builtin. you just need to pass the collection and the page size for that On Wed, May 11, 2011 at 3:25 PM, Pankaj Gupta wrote: > Hi All, > > Is there any way Jaakata /SUN library or any api in struts which can be > used > to > implement pagination. > > > I suggested Display tag and Page Loader, but since they are not open > source, > not ssociated with Jakarta/Sun, user is not agreeging to it? > > > Any suggestions would be appreciated? > > > Thanks, > Pankaj > -- Regards Kushan Jayathilake
Re: Pagination with Struts 2.1.8 ?
We use display tag extensively and it ties into S2 really well. We¹ve set it up to use DB based pagination so you only load the items you need and it ties into S2 i18n properties. We also use jqGrid which is based on jQuery and works really well where you want ajax based tables. Z. > > Thanks. I already read about it but does it work well with Struts 2 ? > > > --- On Mon, 3/29/10, Alex Rodriguez Lopez wrote: > > > From: Alex Rodriguez Lopez > Subject: Re: Pagination with Struts 2.1.8 ? > To: user@struts.apache.org > Date: Monday, March 29, 2010, 4:32 AM > > > Display tag, works like a charm: > > http://displaytag.sourceforge.net/1.2/tut_basic.html > > Works with lists and handles pagination, data export, I recommend it! > > Em 29-03-2010 11:07, Celinio Fernandes escreveu: >> > Hi, >> > This is a classic requirement. >> > I have this table, in a JSP, that I have created with the html tag >> and that i have filled using the. >> > This tag iterates over an ArrayList defined in my action. >> > There are too many lines and I need to add some pagination functionality to >> it. >> > What solutions are out there and which one do you recommend ? >> > Thanks for your feedback. >> > >> > >> > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > >
Re: Pagination with Struts 2.1.8 ?
Em 29-03-2010 15:09, Celinio Fernandes escreveu: Thanks. I already read about it but does it work well with Struts 2 ? Yes, I'm using it with S2. Include it in JSPs like this <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %> then, for example for a listing of users: <%-- other columns of users --%> This assumes you have a list of beans called "users" in your action, with a propertry named "name", with getters/setters. Of course, if performance is a problem pagination would be best done at DB level as Adam suggested. --- On Mon, 3/29/10, Alex Rodriguez Lopez wrote: From: Alex Rodriguez Lopez Subject: Re: Pagination with Struts 2.1.8 ? To: user@struts.apache.org Date: Monday, March 29, 2010, 4:32 AM Display tag, works like a charm: http://displaytag.sourceforge.net/1.2/tut_basic.html Works with lists and handles pagination, data export, I recommend it! Em 29-03-2010 11:07, Celinio Fernandes escreveu: Hi, This is a classic requirement. I have this table, in a JSP, that I have created with the html tag and that i have filled using the. This tag iterates over an ArrayList defined in my action. There are too many lines and I need to add some pagination functionality to it. What solutions are out there and which one do you recommend ? Thanks for your feedback. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination with Struts 2.1.8 ?
Thanks. I already read about it but does it work well with Struts 2 ? --- On Mon, 3/29/10, Alex Rodriguez Lopez wrote: From: Alex Rodriguez Lopez Subject: Re: Pagination with Struts 2.1.8 ? To: user@struts.apache.org Date: Monday, March 29, 2010, 4:32 AM Display tag, works like a charm: http://displaytag.sourceforge.net/1.2/tut_basic.html Works with lists and handles pagination, data export, I recommend it! Em 29-03-2010 11:07, Celinio Fernandes escreveu: > Hi, > This is a classic requirement. > I have this table, in a JSP, that I have created with the html tag > and that i have filled using the. > This tag iterates over an ArrayList defined in my action. > There are too many lines and I need to add some pagination functionality to > it. > What solutions are out there and which one do you recommend ? > Thanks for your feedback. > > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Pagination with Struts 2.1.8 ?
i prefer pagination to be db based so there is a minimum amount of data retrieved and held in memory. i.e. only retrieve what you will display. don't retrieve 200 records in memory and page through them. adam > Date: Mon, 29 Mar 2010 03:07:25 -0700 > From: cel...@yahoo.com > Subject: Pagination with Struts 2.1.8 ? > To: user@struts.apache.org > > Hi, > This is a classic requirement. > I have this table, in a JSP, that I have created with the html tag and that i have filled using the . > This tag iterates over an ArrayList defined in my action. > There are too many lines and I need to add some pagination functionality to > it. > What solutions are out there and which one do you recommend ? > Thanks for your feedback. > > > _ Do you have a story that started on Hotmail? Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination with Struts 2.1.8 ?
Display tag, works like a charm: http://displaytag.sourceforge.net/1.2/tut_basic.html Works with lists and handles pagination, data export, I recommend it! Em 29-03-2010 11:07, Celinio Fernandes escreveu: Hi, This is a classic requirement. I have this table, in a JSP, that I have created with the html tag and that i have filled using the. This tag iterates over an ArrayList defined in my action. There are too many lines and I need to add some pagination functionality to it. What solutions are out there and which one do you recommend ? Thanks for your feedback. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination
Yup, it's possible, just read the DisplayTag documentation on external pagination. (*Chris*) On Mon, May 25, 2009 at 5:49 AM, Bhaarat Sharma wrote: > adding to this question... > > I've asked this before as well but not gotten a clearer answer. > > What if in the same example as this but when user clicks 'next' you want to > go back and fetch the results again. Will that be possible with display > tag. What I mean is that lets say that the list is being populated by a > stored procedure. Because of performance, we are only getting 50 items at > a time from the store procedure and displaying 50 on one page. When user > clicks Next, we want to go back and execute the SP to get the next set of > 50 > results. > > Any hints on how to achieve this with display tags? > > On Mon, May 25, 2009 at 5:14 AM, Lukasz Lenart < > lukasz.len...@googlemail.com > > wrote: > > > 2009/5/25 Murugesh : > > > is their any way to modify the display? > > > > > > like the page no's and no of items coming on top , i need it to be > > bottom. > > > so where i have to chnage this? > > > > Check DisplayTag documentation, for begining that [1] > > > > [1] http://displaytag.sourceforge.net/1.2/configuration.html > > > > > > Regards > > -- > > Lukasz > > http://www.lenart.org.pl/ > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > >
RE: Pagination
referencing the documentation lucas provided we can see the number of records/page are provided by displaytag.properties (version 1.1) sort.amount=50 (version 1.2) pagesize=50 ..concerning how to manipulate what you're reading all you have to do is replace the InputStream with one from DS ... package org.displaytag.sample.DisplaySourceServlet protected final void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String jspFile = request.getRequestURI(); // lastIndexOf(".") can't be null, since the servlet is mapped to ".source" jspFile = jspFile.substring(0, jspFile.lastIndexOf(".")); //$NON-NLS-1$ if (jspFile.lastIndexOf("/") != -1) //$NON-NLS-1$ { jspFile = jspFile.substring(jspFile.lastIndexOf("/") + 1); //$NON-NLS-1$ } // only want to show sample pages, don't play with url! if (!jspFile.startsWith("example-")) //$NON-NLS-1$ { throw new ServletException("Invalid file selected: " + jspFile); //$NON-NLS-1$ } String fullName = EXAMPLE_FOLDER + jspFile; //InputStream inputStream = getServletContext().getResourceAsStream(fullName); //replace the inputStream logic with a stream obtained from configured DataSource //if you are using Oracle you can use oracle.sql.OracleJdbc2SQLInput readAsciiStream which returns InputStream readAsciiStream public InputStream readAsciiStream() throws SQLException (Return the next attribute in the stream as a stream of ASCII characters. ) JavaDoc available at http://www.oracle.com/technology/docs/tech/java/sqlj_jdbc/doc_library/javadoc/oracle.sql.OracleJdbc2SQLInput.html#_top_ and simply use that InputStream to read DataSource contents from anyone else? Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Mon, 25 May 2009 08:49:33 -0400 > Subject: Re: Pagination > From: bhaara...@gmail.com > To: user@struts.apache.org > > adding to this question... > > I've asked this before as well but not gotten a clearer answer. > > What if in the same example as this but when user clicks 'next' you want to > go back and fetch the results again. Will that be possible with display > tag. What I mean is that lets say that the list is being populated by a > stored procedure. Because of performance, we are only getting 50 items at > a time from the store procedure and displaying 50 on one page. When user > clicks Next, we want to go back and execute the SP to get the next set of 50 > results. > > Any hints on how to achieve this with display tags? > > On Mon, May 25, 2009 at 5:14 AM, Lukasz Lenart > wrote: > > > 2009/5/25 Murugesh : > > > is their any way to modify the display? > > > > > > like the page no's and no of items coming on top , i need it to be > > bottom. > > > so where i have to chnage this? > > > > Check DisplayTag documentation, for begining that [1] > > > > [1] http://displaytag.sourceforge.net/1.2/configuration.html > > > > > > Regards > > -- > > Lukasz > > http://www.lenart.org.pl/ > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > _ Hotmail® has ever-growing storage! Don’t worry about storage limits. http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage1_052009
Re: Pagination
adding to this question... I've asked this before as well but not gotten a clearer answer. What if in the same example as this but when user clicks 'next' you want to go back and fetch the results again. Will that be possible with display tag. What I mean is that lets say that the list is being populated by a stored procedure. Because of performance, we are only getting 50 items at a time from the store procedure and displaying 50 on one page. When user clicks Next, we want to go back and execute the SP to get the next set of 50 results. Any hints on how to achieve this with display tags? On Mon, May 25, 2009 at 5:14 AM, Lukasz Lenart wrote: > 2009/5/25 Murugesh : > > is their any way to modify the display? > > > > like the page no's and no of items coming on top , i need it to be > bottom. > > so where i have to chnage this? > > Check DisplayTag documentation, for begining that [1] > > [1] http://displaytag.sourceforge.net/1.2/configuration.html > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Pagination
2009/5/25 Murugesh : > is their any way to modify the display? > > like the page no's and no of items coming on top , i need it to be bottom. > so where i have to chnage this? Check DisplayTag documentation, for begining that [1] [1] http://displaytag.sourceforge.net/1.2/configuration.html Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination
i got fix for this. i missed request uri in tag. thanks for helping a lot. is their any way to modify the display? like the page no's and no of items coming on top , i need it to be bottom. so where i have to chnage this? On Mon, May 25, 2009 at 2:19 PM, Murugesh wrote: > Wow. it getting displayed. but if i click next page it got an error > ie requset resource not available. > is i missed anything? > > On Mon, May 25, 2009 at 1:17 PM, Lukasz Lenart < > lukasz.len...@googlemail.com> wrote: > >> 2009/5/25 Murugesh : >> > i am getting list with but not displaytag >> >> Did you try Chris suggestion? >> >> >> Regards >> -- >> Lukasz >> http://www.lenart.org.pl/ >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >
Re: Pagination
Wow. it getting displayed. but if i click next page it got an error ie requset resource not available. is i missed anything? On Mon, May 25, 2009 at 1:17 PM, Lukasz Lenart wrote: > 2009/5/25 Murugesh : > > i am getting list with but not displaytag > > Did you try Chris suggestion? > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Pagination
2009/5/25 Murugesh : > i am getting list with but not displaytag Did you try Chris suggestion? Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination
No Lukasz my struts.xml is /WEB-INF/components/packet/showData.jsp i am getting list with but not displaytag On Mon, May 25, 2009 at 12:53 PM, Lukasz Lenart < lukasz.len...@googlemail.com> wrote: > End the last thing, action's configuration. As I noticed you don't use > execute() method and maybe your are missing call to method > call30Mdata(). And also try Chris suggestion. > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Pagination
End the last thing, action's configuration. As I noticed you don't use execute() method and maybe your are missing call to method call30Mdata(). And also try Chris suggestion. Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination
public class PacketsAction extends ActionBase { public ManagePacketsAction() { public String call30Mdata() throws ServiceException { DataManager dm = new DataManager(); setMinDataList(dm.getMinsData(null, "getall")) try { } private List minDataList = null; public List getMinDataList() { return minDataList; } public void setMinDataList(List minDataList) { this.minDataList = minDataList; } } On Mon, May 25, 2009 at 12:35 PM, Lukasz Lenart < lukasz.len...@googlemail.com> wrote: > 2009/5/25 Murugesh : > > > pagesize="10" > > > > > > > > > Could you also show action code? > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Pagination
You might try: instead. (*Chris*) On Sun, May 24, 2009 at 11:56 PM, Murugesh wrote: > thanks Lukasz > what i did is, > > added :displaytag-1.2.jar in the lib > added :<%@ taglib uri="http://displaytag.sf.net"; prefix="display"%> in > my > JSP > code snippet is > pagesize="10" > > > > > thanks > murugesh > > On Mon, May 25, 2009 at 12:15 PM, Lukasz Lenart < > lukasz.len...@googlemail.com> wrote: > > > 2009/5/25 Murugesh : > > > can any one help me to achieve this? > > > > Could you show how did you try to use DisplayTag, some code example? > > > > > > Regards > > -- > > Lukasz > > http://www.lenart.org.pl/ > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > >
Re: Pagination
2009/5/25 Murugesh : > pagesize="10" > > > > Could you also show action code? Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination
thanks Lukasz what i did is, added :displaytag-1.2.jar in the lib added :<%@ taglib uri="http://displaytag.sf.net"; prefix="display"%> in my JSP code snippet is thanks murugesh On Mon, May 25, 2009 at 12:15 PM, Lukasz Lenart < lukasz.len...@googlemail.com> wrote: > 2009/5/25 Murugesh : > > can any one help me to achieve this? > > Could you show how did you try to use DisplayTag, some code example? > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Pagination
2009/5/25 Murugesh : > can any one help me to achieve this? Could you show how did you try to use DisplayTag, some code example? Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: pagination in struts2
i take a fast look about your link i can done the presentation of the data by myself ? these libraries done only the pagination? On Thu, Apr 23, 2009 at 23:08, denis cabasson wrote: > Display tag is great for table pagination. > If you are looking for pagination without tables, I'd recommend the pager > tag library : > http://jsptags.com/tags/navigation/pager/index.jsp > Custom coding is my least favorite way of solving an issue. > To extract a variable from an action to the page, I'd recommend using a > s:set tag to set a variable holding the list in the page context. > Your example of displaytag is missing : > > (before the display tag) > > Denis. > > On Thu, Apr 23, 2009 at 1:01 PM, Stefano Tranquillini < > stefano.tranquill...@gmail.com> wrote: > >> i've done a pagination by myself. >> is an Alpha relase :D, not tested but u can set size and page to display: >> >> action: >> >> >> private List items = new ArrayList(); >> private int tot; >> private int page = 0; >> private int size = 1; >> private List pages = new ArrayList(); >> >> public AllItem() { >> } >> >> �...@override >> public String execute() throws Exception { >> List temp = mgmt.getAllItem(); >> if (page > 0) { >> page--; >> } >> if (size > temp.size()) { >> size = temp.size(); >> } >> int start = Math.min(page * size, temp.size()); >> if (start == temp.size()) { >> start = start - size; >> } >> int end = Math.min((page + 1) * size, temp.size()); >> items = new ArrayList(); >> items = temp.subList(start, end); >> tot = getItems().size(); >> pages = new ArrayList(); >> for (int i = 0; i < temp.size(); i = i + size) { >> pages.add((i / size) + 1); >> } >> return SUCCESS; >> } >> >> public List getItems() { >> return items; >> } >> >> public int getTot() { >> return tot; >> } >> >> public int getPage() { >> return page; >> } >> >> public void setPage(int page) { >> this.page = page; >> } >> >> public int getSize() { >> return size; >> } >> >> public void setSize(int size) { >> this.size = size; >> } >> >> public List getPages() { >> return pages; >> } >> >> jsp >> >> <%@ taglib uri="/struts-tags" prefix="s" %> >> >> >> >> do your presentation of the data >> >> >> >> this is the menu change the action! >> >> >> >> >> >> >> "> >> >> >> >> >> On Thu, Apr 23, 2009 at 18:28, Andy Sykes wrote: >> > I found I had to use the tag to set the object in the request >> scope >> > before displaytag could "see" it, since displaytag doesn't know about the >> > Value Stack (maybe it should?). Confusingly, displaytag gives you that >> > message if it can't see the variable you're referencing, as well as if >> the >> > variable is empty. >> > >> > eg. >> > >> > On 23 Apr 2009, at 17:11, Stefano Tranquillini wrote: >> > >> >> i done this: >> >> >> >> this is the class taht create the list >> >> >> >> private List items = new ArrayList(); >> >> private Integer resultSize; >> >> >> >> public AllItem() { >> >> } >> >> >> >> @Override >> >> public String execute() throws Exception { >> >> items= mgmt.getAllItem(); >> >> resultSize=getItems().size(); >> >> return SUCCESS; >> >> } >> >> >> >> public List getItems() { >> >> return items; >> >> } >> >> >> >> >> >> public Integer getResultSize() { >> >> return resultSize; >> >> } >> >> >> >> this is the page >> >> >> >> <%@ taglib uri="/struts-tags" prefix="s" %> >> >> <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %> >> >> >> >> > >> size="resultSize"> >> >> >> >> >> >> >> >> >> >> >> >> the result is: >> >> Nothing found to display. >> >> >> >> On Thu, Apr 23, 2009 at 17:52, Stefano Tranquillini >> >> wrote: >> >>> >> >>> emm i've a list in my session called items. >> >>> >> >>> so i'd write >> >>> a ok, i'd understand, now works. >> >>> >> >>> anyway, how can i create the page number below? >> >>> >> >>> >> >>> On Thu, Apr 23, 2009 at 17:40, Bhaarat Sharma >> >>> wrote: >> >> u have to first create TestList for the code to work >> >> On Thu, Apr 23, 2009 at 11:36 AM, Stefano wrote: >> >> > when i put >> > <% request.setAttribute( "test", new TestList(2, false) ); %> >> > >> > netbeans said: cannot find construtcto TestList(int,bool) >> > >> > and the application goes in a exception: >> > >> > org.apache.jasper.JasperException: Unable to compile class for JSP: >> > >> > An error occurred at line: 1 in the jsp file: /jsp/shop/shop.jsp >> > TestList cannot be resolved to a type >> > 1: <% request.setAttribute( "test", new TestList(2, false) ); %> >> > 2: <%@ tagli
Re: pagination in struts2
Display tag is great for table pagination. If you are looking for pagination without tables, I'd recommend the pager tag library : http://jsptags.com/tags/navigation/pager/index.jsp Custom coding is my least favorite way of solving an issue. To extract a variable from an action to the page, I'd recommend using a s:set tag to set a variable holding the list in the page context. Your example of displaytag is missing : (before the display tag) Denis. On Thu, Apr 23, 2009 at 1:01 PM, Stefano Tranquillini < stefano.tranquill...@gmail.com> wrote: > i've done a pagination by myself. > is an Alpha relase :D, not tested but u can set size and page to display: > > action: > > >private List items = new ArrayList(); > private int tot; >private int page = 0; >private int size = 1; >private List pages = new ArrayList(); > >public AllItem() { >} > >@Override >public String execute() throws Exception { > List temp = mgmt.getAllItem(); >if (page > 0) { >page--; >} >if (size > temp.size()) { >size = temp.size(); >} >int start = Math.min(page * size, temp.size()); >if (start == temp.size()) { >start = start - size; >} >int end = Math.min((page + 1) * size, temp.size()); >items = new ArrayList(); >items = temp.subList(start, end); >tot = getItems().size(); >pages = new ArrayList(); >for (int i = 0; i < temp.size(); i = i + size) { >pages.add((i / size) + 1); > } >return SUCCESS; >} > >public List getItems() { >return items; >} > > public int getTot() { >return tot; >} > >public int getPage() { >return page; >} > >public void setPage(int page) { >this.page = page; >} > >public int getSize() { >return size; >} > >public void setSize(int size) { >this.size = size; >} > >public List getPages() { >return pages; >} > > jsp > > <%@ taglib uri="/struts-tags" prefix="s" %> > > > >do your presentation of the data > > > > this is the menu change the action! > > > > > > > "> > > > > > On Thu, Apr 23, 2009 at 18:28, Andy Sykes wrote: > > I found I had to use the tag to set the object in the request > scope > > before displaytag could "see" it, since displaytag doesn't know about the > > Value Stack (maybe it should?). Confusingly, displaytag gives you that > > message if it can't see the variable you're referencing, as well as if > the > > variable is empty. > > > > eg. > > > > On 23 Apr 2009, at 17:11, Stefano Tranquillini wrote: > > > >> i done this: > >> > >> this is the class taht create the list > >> > >> private List items = new ArrayList(); > >> private Integer resultSize; > >> > >> public AllItem() { > >> } > >> > >> @Override > >> public String execute() throws Exception { > >> items= mgmt.getAllItem(); > >> resultSize=getItems().size(); > >> return SUCCESS; > >> } > >> > >> public List getItems() { > >> return items; > >> } > >> > >> > >> public Integer getResultSize() { > >> return resultSize; > >> } > >> > >> this is the page > >> > >> <%@ taglib uri="/struts-tags" prefix="s" %> > >> <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %> > >> > >> >> size="resultSize"> > >> > >> > >> > >> > >> > >> the result is: > >> Nothing found to display. > >> > >> On Thu, Apr 23, 2009 at 17:52, Stefano Tranquillini > >> wrote: > >>> > >>> emm i've a list in my session called items. > >>> > >>> so i'd write > >>> a ok, i'd understand, now works. > >>> > >>> anyway, how can i create the page number below? > >>> > >>> > >>> On Thu, Apr 23, 2009 at 17:40, Bhaarat Sharma > >>> wrote: > > u have to first create TestList for the code to work > > On Thu, Apr 23, 2009 at 11:36 AM, Stefano wrote: > > > when i put > > <% request.setAttribute( "test", new TestList(2, false) ); %> > > > > netbeans said: cannot find construtcto TestList(int,bool) > > > > and the application goes in a exception: > > > > org.apache.jasper.JasperException: Unable to compile class for JSP: > > > > An error occurred at line: 1 in the jsp file: /jsp/shop/shop.jsp > > TestList cannot be resolved to a type > > 1: <% request.setAttribute( "test", new TestList(2, false) ); %> > > 2: <%@ taglib uri="/struts-tags" prefix="s" %> > > 3: > > 4: > > > > idea? > > > > > > 2009/4/23 André Diniz : > >> > >> It's just a sample pages... > >> > >> 2009/4/22 Dave Newton > >> > >>> http://displaytag.sourceforge.net/1.2/tut_externalSortAndPage.html > >>> > >>> It pays to really spend some time looking over existing > >>> docum
Re: pagination in struts2
i've done a pagination by myself. is an Alpha relase :D, not tested but u can set size and page to display: action: private List items = new ArrayList(); private int tot; private int page = 0; private int size = 1; private List pages = new ArrayList(); public AllItem() { } @Override public String execute() throws Exception { List temp = mgmt.getAllItem(); if (page > 0) { page--; } if (size > temp.size()) { size = temp.size(); } int start = Math.min(page * size, temp.size()); if (start == temp.size()) { start = start - size; } int end = Math.min((page + 1) * size, temp.size()); items = new ArrayList(); items = temp.subList(start, end); tot = getItems().size(); pages = new ArrayList(); for (int i = 0; i < temp.size(); i = i + size) { pages.add((i / size) + 1); } return SUCCESS; } public List getItems() { return items; } public int getTot() { return tot; } public int getPage() { return page; } public void setPage(int page) { this.page = page; } public int getSize() { return size; } public void setSize(int size) { this.size = size; } public List getPages() { return pages; } jsp <%@ taglib uri="/struts-tags" prefix="s" %> do your presentation of the data this is the menu change the action! "> On Thu, Apr 23, 2009 at 18:28, Andy Sykes wrote: > I found I had to use the tag to set the object in the request scope > before displaytag could "see" it, since displaytag doesn't know about the > Value Stack (maybe it should?). Confusingly, displaytag gives you that > message if it can't see the variable you're referencing, as well as if the > variable is empty. > > eg. > > On 23 Apr 2009, at 17:11, Stefano Tranquillini wrote: > >> i done this: >> >> this is the class taht create the list >> >> private List items = new ArrayList(); >> private Integer resultSize; >> >> public AllItem() { >> } >> >> @Override >> public String execute() throws Exception { >> items= mgmt.getAllItem(); >> resultSize=getItems().size(); >> return SUCCESS; >> } >> >> public List getItems() { >> return items; >> } >> >> >> public Integer getResultSize() { >> return resultSize; >> } >> >> this is the page >> >> <%@ taglib uri="/struts-tags" prefix="s" %> >> <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %> >> >> > size="resultSize"> >> >> >> >> >> >> the result is: >> Nothing found to display. >> >> On Thu, Apr 23, 2009 at 17:52, Stefano Tranquillini >> wrote: >>> >>> emm i've a list in my session called items. >>> >>> so i'd write >>> a ok, i'd understand, now works. >>> >>> anyway, how can i create the page number below? >>> >>> >>> On Thu, Apr 23, 2009 at 17:40, Bhaarat Sharma >>> wrote: u have to first create TestList for the code to work On Thu, Apr 23, 2009 at 11:36 AM, Stefano wrote: > when i put > <% request.setAttribute( "test", new TestList(2, false) ); %> > > netbeans said: cannot find construtcto TestList(int,bool) > > and the application goes in a exception: > > org.apache.jasper.JasperException: Unable to compile class for JSP: > > An error occurred at line: 1 in the jsp file: /jsp/shop/shop.jsp > TestList cannot be resolved to a type > 1: <% request.setAttribute( "test", new TestList(2, false) ); %> > 2: <%@ taglib uri="/struts-tags" prefix="s" %> > 3: > 4: > > idea? > > > 2009/4/23 André Diniz : >> >> It's just a sample pages... >> >> 2009/4/22 Dave Newton >> >>> http://displaytag.sourceforge.net/1.2/tut_externalSortAndPage.html >>> >>> It pays to really spend some time looking over existing >>> documentation; > > it's >>> >>> often quicker than waiting for someone on a list or forum to answer. >>> >>> Dave >>> >>> >>> Bhaarat Sharma wrote: >>> jim, I found this example > > http://displaytag.homeip.net/displaytag-examples-1.2/example-paging.jsp?d-49653-p=1 it says "Ok, you have made a query that returns you back a list of 120 elements, but you don't want to show the user all 120 items at once, > > you want to allow them to page through the results (pretend 120 is really > > 1200 or 12000)." they are iterating through a long 12000 record list and then just > > putting that into pages. What I was loo
Re: pagination in struts2
I found I had to use the tag to set the object in the request scope before displaytag could "see" it, since displaytag doesn't know about the Value Stack (maybe it should?). Confusingly, displaytag gives you that message if it can't see the variable you're referencing, as well as if the variable is empty. eg. On 23 Apr 2009, at 17:11, Stefano Tranquillini wrote: i done this: this is the class taht create the list private List items = new ArrayList(); private Integer resultSize; public AllItem() { } @Override public String execute() throws Exception { items= mgmt.getAllItem(); resultSize=getItems().size(); return SUCCESS; } public List getItems() { return items; } public Integer getResultSize() { return resultSize; } this is the page <%@ taglib uri="/struts-tags" prefix="s" %> <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %> the result is: Nothing found to display. On Thu, Apr 23, 2009 at 17:52, Stefano Tranquillini wrote: emm i've a list in my session called items. so i'd write a ok, i'd understand, now works. anyway, how can i create the page number below? On Thu, Apr 23, 2009 at 17:40, Bhaarat Sharma wrote: u have to first create TestList for the code to work On Thu, Apr 23, 2009 at 11:36 AM, Stefano wrote: when i put <% request.setAttribute( "test", new TestList(2, false) ); %> netbeans said: cannot find construtcto TestList(int,bool) and the application goes in a exception: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 1 in the jsp file: /jsp/shop/shop.jsp TestList cannot be resolved to a type 1: <% request.setAttribute( "test", new TestList(2, false) ); %> 2: <%@ taglib uri="/struts-tags" prefix="s" %> 3: 4: idea? 2009/4/23 André Diniz : It's just a sample pages... 2009/4/22 Dave Newton http://displaytag.sourceforge.net/1.2/ tut_externalSortAndPage.html It pays to really spend some time looking over existing documentation; it's often quicker than waiting for someone on a list or forum to answer. Dave Bhaarat Sharma wrote: jim, I found this example http://displaytag.homeip.net/displaytag-examples-1.2/example-paging.jsp?d-49653-p=1 it says "Ok, you have made a query that returns you back a list of 120 elements, but you don't want to show the user all 120 items at once, you want to allow them to page through the results (pretend 120 is really 1200 or 12000)." they are iterating through a long 12000 record list and then just putting that into pages. What I was looking for was something that would show 50 results of 12000 on first page then when NEXT is cliked, it against goes to DB to get next 50 records. On Wed, Apr 22, 2009 at 4:22 PM, Jim Kiley > wrote: I found this within thirty seconds of clicking Dave's link: http://displaytag.sourceforge.net/1.2/tut_sources.html Note that the contents of this page are actually fairly freakin' horrible and should not be done on a grownup application. But the instructions are right there and easy to find. jk On Wed, Apr 22, 2009 at 4:18 PM, Bhaarat Sharma > wrote: I wanted to use it for the purpose so that when I click NEXT or 2nd page then again I go to the DB to fetch next set of 50 records. but didnt see any examples of that sort On Wed, Apr 22, 2009 at 4:13 PM, Dave Newton > wrote: Stefano Tranquillini wrote: someone has experience with this tag? i don't really understand how it works. What issues are you having? There are a number of tutorials and examples on the site: http://displaytag.sourceforge.net/1.2/tut_basic.html Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Jim Kiley Senior Technical Consultant | Summa [p] 412.258.3346 http://www.summa-tech.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- André Diniz +55 (41) 9997-5567 e-mail alternativo: diniz...@msn.com -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Stefano -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: pagination in struts2
i done this: this is the class taht create the list private List items = new ArrayList(); private Integer resultSize; public AllItem() { } @Override public String execute() throws Exception { items= mgmt.getAllItem(); resultSize=getItems().size(); return SUCCESS; } public List getItems() { return items; } public Integer getResultSize() { return resultSize; } this is the page <%@ taglib uri="/struts-tags" prefix="s" %> <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %> the result is: Nothing found to display. On Thu, Apr 23, 2009 at 17:52, Stefano Tranquillini wrote: > emm i've a list in my session called items. > > so i'd write > a ok, i'd understand, now works. > > anyway, how can i create the page number below? > > > On Thu, Apr 23, 2009 at 17:40, Bhaarat Sharma wrote: >> u have to first create TestList for the code to work >> >> On Thu, Apr 23, 2009 at 11:36 AM, Stefano wrote: >> >>> when i put >>> <% request.setAttribute( "test", new TestList(2, false) ); %> >>> >>> netbeans said: cannot find construtcto TestList(int,bool) >>> >>> and the application goes in a exception: >>> >>> org.apache.jasper.JasperException: Unable to compile class for JSP: >>> >>> An error occurred at line: 1 in the jsp file: /jsp/shop/shop.jsp >>> TestList cannot be resolved to a type >>> 1: <% request.setAttribute( "test", new TestList(2, false) ); %> >>> 2: <%@ taglib uri="/struts-tags" prefix="s" %> >>> 3: >>> 4: >>> >>> idea? >>> >>> >>> 2009/4/23 André Diniz : >>> > It's just a sample pages... >>> > >>> > 2009/4/22 Dave Newton >>> > >>> >> http://displaytag.sourceforge.net/1.2/tut_externalSortAndPage.html >>> >> >>> >> It pays to really spend some time looking over existing documentation; >>> it's >>> >> often quicker than waiting for someone on a list or forum to answer. >>> >> >>> >> Dave >>> >> >>> >> >>> >> Bhaarat Sharma wrote: >>> >> >>> >>> jim, >>> >>> >>> >>> I found this example >>> >>> >>> >>> >>> >>> >>> http://displaytag.homeip.net/displaytag-examples-1.2/example-paging.jsp?d-49653-p=1 >>> >>> >>> >>> it says "Ok, you have made a query that returns you back a list of 120 >>> >>> elements, but you don't want to show the user all 120 items at once, >>> you >>> >>> want to allow them to page through the results (pretend 120 is really >>> 1200 >>> >>> or 12000)." >>> >>> >>> >>> they are iterating through a long 12000 record list and then just >>> putting >>> >>> that into pages. What I was looking for was something that would show >>> 50 >>> >>> results of 12000 on first page then when NEXT is cliked, it against >>> goes >>> >>> to >>> >>> DB to get next 50 records. >>> >>> >>> >>> >>> >>> >>> >>> On Wed, Apr 22, 2009 at 4:22 PM, Jim Kiley >>> >>> wrote: >>> >>> >>> >>> I found this within thirty seconds of clicking Dave's link: >>> http://displaytag.sourceforge.net/1.2/tut_sources.html >>> >>> Note that the contents of this page are actually fairly freakin' >>> horrible >>> and should not be done on a grownup application. But the instructions >>> are >>> right there and easy to find. >>> >>> jk >>> >>> On Wed, Apr 22, 2009 at 4:18 PM, Bhaarat Sharma >>> wrote: >>> >>> I wanted to use it for the purpose so that when I click NEXT or 2nd >>> page >>> > then again I go to the DB to fetch next set of 50 records. >>> > >>> > but didnt see any examples of that sort >>> > >>> > On Wed, Apr 22, 2009 at 4:13 PM, Dave Newton >>> > wrote: >>> > >>> > Stefano Tranquillini wrote: >>> >> >>> >> someone has experience with this tag? >>> >>> >>> >>> i don't really understand how it works. >>> >>> >>> >>> What issues are you having? There are a number of tutorials and >>> >> >>> > examples >>> >>> > on >>> > >>> >> the site: >>> >> >>> >> http://displaytag.sourceforge.net/1.2/tut_basic.html >>> >> >>> >> Dave >>> >> >>> >> >>> >> >>> >> >>> - >>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> >> For additional commands, e-mail: user-h...@struts.apache.org >>> >> >>> >> >>> >> >>> >>> -- >>> Jim Kiley >>> Senior Technical Consultant | Summa >>> [p] 412.258.3346 >>> http://www.summa-tech.com >>> >>> >>> >>> >>> >> >>> >> - >>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> >> For additional commands, e-mail: user-h...@struts.apache.org >>> >> >>> >> >>> > >>> > >>> > -- >>> > André Diniz >>> > +55 (41) 9997-5567 >>> > e-mail alternativo: diniz...@msn.com >>> > >>> >>> >>> >>> -- >>> Stefano >>> >>> - >>> To unsubscribe, e-mai
Re: pagination in struts2
emm i've a list in my session called items. so i'd write a ok, i'd understand, now works. anyway, how can i create the page number below? On Thu, Apr 23, 2009 at 17:40, Bhaarat Sharma wrote: > u have to first create TestList for the code to work > > On Thu, Apr 23, 2009 at 11:36 AM, Stefano wrote: > >> when i put >> <% request.setAttribute( "test", new TestList(2, false) ); %> >> >> netbeans said: cannot find construtcto TestList(int,bool) >> >> and the application goes in a exception: >> >> org.apache.jasper.JasperException: Unable to compile class for JSP: >> >> An error occurred at line: 1 in the jsp file: /jsp/shop/shop.jsp >> TestList cannot be resolved to a type >> 1: <% request.setAttribute( "test", new TestList(2, false) ); %> >> 2: <%@ taglib uri="/struts-tags" prefix="s" %> >> 3: >> 4: >> >> idea? >> >> >> 2009/4/23 André Diniz : >> > It's just a sample pages... >> > >> > 2009/4/22 Dave Newton >> > >> >> http://displaytag.sourceforge.net/1.2/tut_externalSortAndPage.html >> >> >> >> It pays to really spend some time looking over existing documentation; >> it's >> >> often quicker than waiting for someone on a list or forum to answer. >> >> >> >> Dave >> >> >> >> >> >> Bhaarat Sharma wrote: >> >> >> >>> jim, >> >>> >> >>> I found this example >> >>> >> >>> >> >>> >> http://displaytag.homeip.net/displaytag-examples-1.2/example-paging.jsp?d-49653-p=1 >> >>> >> >>> it says "Ok, you have made a query that returns you back a list of 120 >> >>> elements, but you don't want to show the user all 120 items at once, >> you >> >>> want to allow them to page through the results (pretend 120 is really >> 1200 >> >>> or 12000)." >> >>> >> >>> they are iterating through a long 12000 record list and then just >> putting >> >>> that into pages. What I was looking for was something that would show >> 50 >> >>> results of 12000 on first page then when NEXT is cliked, it against >> goes >> >>> to >> >>> DB to get next 50 records. >> >>> >> >>> >> >>> >> >>> On Wed, Apr 22, 2009 at 4:22 PM, Jim Kiley >> >>> wrote: >> >>> >> >>> I found this within thirty seconds of clicking Dave's link: >> http://displaytag.sourceforge.net/1.2/tut_sources.html >> >> Note that the contents of this page are actually fairly freakin' >> horrible >> and should not be done on a grownup application. But the instructions >> are >> right there and easy to find. >> >> jk >> >> On Wed, Apr 22, 2009 at 4:18 PM, Bhaarat Sharma >> wrote: >> >> I wanted to use it for the purpose so that when I click NEXT or 2nd >> page >> > then again I go to the DB to fetch next set of 50 records. >> > >> > but didnt see any examples of that sort >> > >> > On Wed, Apr 22, 2009 at 4:13 PM, Dave Newton >> > wrote: >> > >> > Stefano Tranquillini wrote: >> >> >> >> someone has experience with this tag? >> >>> >> >>> i don't really understand how it works. >> >>> >> >>> What issues are you having? There are a number of tutorials and >> >> >> > examples >> >> > on >> > >> >> the site: >> >> >> >> http://displaytag.sourceforge.net/1.2/tut_basic.html >> >> >> >> Dave >> >> >> >> >> >> >> >> >> - >> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> >> >> >> >> >> -- >> Jim Kiley >> Senior Technical Consultant | Summa >> [p] 412.258.3346 >> http://www.summa-tech.com >> >> >> >>> >> >> >> >> - >> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> >> >> > >> > >> > -- >> > André Diniz >> > +55 (41) 9997-5567 >> > e-mail alternativo: diniz...@msn.com >> > >> >> >> >> -- >> Stefano >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: pagination in struts2
u have to first create TestList for the code to work On Thu, Apr 23, 2009 at 11:36 AM, Stefano wrote: > when i put > <% request.setAttribute( "test", new TestList(2, false) ); %> > > netbeans said: cannot find construtcto TestList(int,bool) > > and the application goes in a exception: > > org.apache.jasper.JasperException: Unable to compile class for JSP: > > An error occurred at line: 1 in the jsp file: /jsp/shop/shop.jsp > TestList cannot be resolved to a type > 1: <% request.setAttribute( "test", new TestList(2, false) ); %> > 2: <%@ taglib uri="/struts-tags" prefix="s" %> > 3: > 4: > > idea? > > > 2009/4/23 André Diniz : > > It's just a sample pages... > > > > 2009/4/22 Dave Newton > > > >> http://displaytag.sourceforge.net/1.2/tut_externalSortAndPage.html > >> > >> It pays to really spend some time looking over existing documentation; > it's > >> often quicker than waiting for someone on a list or forum to answer. > >> > >> Dave > >> > >> > >> Bhaarat Sharma wrote: > >> > >>> jim, > >>> > >>> I found this example > >>> > >>> > >>> > http://displaytag.homeip.net/displaytag-examples-1.2/example-paging.jsp?d-49653-p=1 > >>> > >>> it says "Ok, you have made a query that returns you back a list of 120 > >>> elements, but you don't want to show the user all 120 items at once, > you > >>> want to allow them to page through the results (pretend 120 is really > 1200 > >>> or 12000)." > >>> > >>> they are iterating through a long 12000 record list and then just > putting > >>> that into pages. What I was looking for was something that would show > 50 > >>> results of 12000 on first page then when NEXT is cliked, it against > goes > >>> to > >>> DB to get next 50 records. > >>> > >>> > >>> > >>> On Wed, Apr 22, 2009 at 4:22 PM, Jim Kiley > >>> wrote: > >>> > >>> I found this within thirty seconds of clicking Dave's link: > http://displaytag.sourceforge.net/1.2/tut_sources.html > > Note that the contents of this page are actually fairly freakin' > horrible > and should not be done on a grownup application. But the instructions > are > right there and easy to find. > > jk > > On Wed, Apr 22, 2009 at 4:18 PM, Bhaarat Sharma > wrote: > > I wanted to use it for the purpose so that when I click NEXT or 2nd > page > > then again I go to the DB to fetch next set of 50 records. > > > > but didnt see any examples of that sort > > > > On Wed, Apr 22, 2009 at 4:13 PM, Dave Newton > > wrote: > > > > Stefano Tranquillini wrote: > >> > >> someone has experience with this tag? > >>> > >>> i don't really understand how it works. > >>> > >>> What issues are you having? There are a number of tutorials and > >> > > examples > > > on > > > >> the site: > >> > >> http://displaytag.sourceforge.net/1.2/tut_basic.html > >> > >> Dave > >> > >> > >> > >> > - > >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > >> > >> > >> > > -- > Jim Kiley > Senior Technical Consultant | Summa > [p] 412.258.3346 > http://www.summa-tech.com > > > >>> > >> > >> - > >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > >> > >> > > > > > > -- > > André Diniz > > +55 (41) 9997-5567 > > e-mail alternativo: diniz...@msn.com > > > > > > -- > Stefano > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: pagination in struts2
Lots of possibilities here:* you need to have a class named TestList in your application * you need a constructor for your TestList class that accepts an int and a boolean as its arguments * you need to be sure you are appropriate importing the reference to TestList in your JSP On Thu, Apr 23, 2009 at 11:36 AM, Stefano wrote: > when i put > <% request.setAttribute( "test", new TestList(2, false) ); %> > > netbeans said: cannot find construtcto TestList(int,bool) > > and the application goes in a exception: > > org.apache.jasper.JasperException: Unable to compile class for JSP: > > An error occurred at line: 1 in the jsp file: /jsp/shop/shop.jsp > TestList cannot be resolved to a type > 1: <% request.setAttribute( "test", new TestList(2, false) ); %> > 2: <%@ taglib uri="/struts-tags" prefix="s" %> > 3: > 4: > > idea? > > > 2009/4/23 André Diniz : > > It's just a sample pages... > > > > 2009/4/22 Dave Newton > > > >> http://displaytag.sourceforge.net/1.2/tut_externalSortAndPage.html > >> > >> It pays to really spend some time looking over existing documentation; > it's > >> often quicker than waiting for someone on a list or forum to answer. > >> > >> Dave > >> > >> > >> Bhaarat Sharma wrote: > >> > >>> jim, > >>> > >>> I found this example > >>> > >>> > >>> > http://displaytag.homeip.net/displaytag-examples-1.2/example-paging.jsp?d-49653-p=1 > >>> > >>> it says "Ok, you have made a query that returns you back a list of 120 > >>> elements, but you don't want to show the user all 120 items at once, > you > >>> want to allow them to page through the results (pretend 120 is really > 1200 > >>> or 12000)." > >>> > >>> they are iterating through a long 12000 record list and then just > putting > >>> that into pages. What I was looking for was something that would show > 50 > >>> results of 12000 on first page then when NEXT is cliked, it against > goes > >>> to > >>> DB to get next 50 records. > >>> > >>> > >>> > >>> On Wed, Apr 22, 2009 at 4:22 PM, Jim Kiley > >>> wrote: > >>> > >>> I found this within thirty seconds of clicking Dave's link: > http://displaytag.sourceforge.net/1.2/tut_sources.html > > Note that the contents of this page are actually fairly freakin' > horrible > and should not be done on a grownup application. But the instructions > are > right there and easy to find. > > jk > > On Wed, Apr 22, 2009 at 4:18 PM, Bhaarat Sharma > wrote: > > I wanted to use it for the purpose so that when I click NEXT or 2nd > page > > then again I go to the DB to fetch next set of 50 records. > > > > but didnt see any examples of that sort > > > > On Wed, Apr 22, 2009 at 4:13 PM, Dave Newton > > wrote: > > > > Stefano Tranquillini wrote: > >> > >> someone has experience with this tag? > >>> > >>> i don't really understand how it works. > >>> > >>> What issues are you having? There are a number of tutorials and > >> > > examples > > > on > > > >> the site: > >> > >> http://displaytag.sourceforge.net/1.2/tut_basic.html > >> > >> Dave > >> > >> > >> > >> > - > >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > >> > >> > >> > > -- > Jim Kiley > Senior Technical Consultant | Summa > [p] 412.258.3346 > http://www.summa-tech.com > > > >>> > >> > >> - > >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > >> > >> > > > > > > -- > > André Diniz > > +55 (41) 9997-5567 > > e-mail alternativo: diniz...@msn.com > > > > > > -- > Stefano > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Jim Kiley Senior Technical Consultant | Summa [p] 412.258.3346 http://www.summa-tech.com
Re: pagination in struts2
when i put <% request.setAttribute( "test", new TestList(2, false) ); %> netbeans said: cannot find construtcto TestList(int,bool) and the application goes in a exception: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 1 in the jsp file: /jsp/shop/shop.jsp TestList cannot be resolved to a type 1: <% request.setAttribute( "test", new TestList(2, false) ); %> 2: <%@ taglib uri="/struts-tags" prefix="s" %> 3: 4: idea? 2009/4/23 André Diniz : > It's just a sample pages... > > 2009/4/22 Dave Newton > >> http://displaytag.sourceforge.net/1.2/tut_externalSortAndPage.html >> >> It pays to really spend some time looking over existing documentation; it's >> often quicker than waiting for someone on a list or forum to answer. >> >> Dave >> >> >> Bhaarat Sharma wrote: >> >>> jim, >>> >>> I found this example >>> >>> >>> http://displaytag.homeip.net/displaytag-examples-1.2/example-paging.jsp?d-49653-p=1 >>> >>> it says "Ok, you have made a query that returns you back a list of 120 >>> elements, but you don't want to show the user all 120 items at once, you >>> want to allow them to page through the results (pretend 120 is really 1200 >>> or 12000)." >>> >>> they are iterating through a long 12000 record list and then just putting >>> that into pages. What I was looking for was something that would show 50 >>> results of 12000 on first page then when NEXT is cliked, it against goes >>> to >>> DB to get next 50 records. >>> >>> >>> >>> On Wed, Apr 22, 2009 at 4:22 PM, Jim Kiley >>> wrote: >>> >>> I found this within thirty seconds of clicking Dave's link: http://displaytag.sourceforge.net/1.2/tut_sources.html Note that the contents of this page are actually fairly freakin' horrible and should not be done on a grownup application. But the instructions are right there and easy to find. jk On Wed, Apr 22, 2009 at 4:18 PM, Bhaarat Sharma wrote: I wanted to use it for the purpose so that when I click NEXT or 2nd page > then again I go to the DB to fetch next set of 50 records. > > but didnt see any examples of that sort > > On Wed, Apr 22, 2009 at 4:13 PM, Dave Newton > wrote: > > Stefano Tranquillini wrote: >> >> someone has experience with this tag? >>> >>> i don't really understand how it works. >>> >>> What issues are you having? There are a number of tutorials and >> > examples > on > >> the site: >> >> http://displaytag.sourceforge.net/1.2/tut_basic.html >> >> Dave >> >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> -- Jim Kiley Senior Technical Consultant | Summa [p] 412.258.3346 http://www.summa-tech.com >>> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > > -- > André Diniz > +55 (41) 9997-5567 > e-mail alternativo: diniz...@msn.com > -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: pagination in struts2
It's just a sample pages... 2009/4/22 Dave Newton > http://displaytag.sourceforge.net/1.2/tut_externalSortAndPage.html > > It pays to really spend some time looking over existing documentation; it's > often quicker than waiting for someone on a list or forum to answer. > > Dave > > > Bhaarat Sharma wrote: > >> jim, >> >> I found this example >> >> >> http://displaytag.homeip.net/displaytag-examples-1.2/example-paging.jsp?d-49653-p=1 >> >> it says "Ok, you have made a query that returns you back a list of 120 >> elements, but you don't want to show the user all 120 items at once, you >> want to allow them to page through the results (pretend 120 is really 1200 >> or 12000)." >> >> they are iterating through a long 12000 record list and then just putting >> that into pages. What I was looking for was something that would show 50 >> results of 12000 on first page then when NEXT is cliked, it against goes >> to >> DB to get next 50 records. >> >> >> >> On Wed, Apr 22, 2009 at 4:22 PM, Jim Kiley >> wrote: >> >> I found this within thirty seconds of clicking Dave's link: >>> http://displaytag.sourceforge.net/1.2/tut_sources.html >>> >>> Note that the contents of this page are actually fairly freakin' horrible >>> and should not be done on a grownup application. But the instructions >>> are >>> right there and easy to find. >>> >>> jk >>> >>> On Wed, Apr 22, 2009 at 4:18 PM, Bhaarat Sharma >>> wrote: >>> >>> I wanted to use it for the purpose so that when I click NEXT or 2nd page then again I go to the DB to fetch next set of 50 records. but didnt see any examples of that sort On Wed, Apr 22, 2009 at 4:13 PM, Dave Newton wrote: Stefano Tranquillini wrote: > > someone has experience with this tag? >> >> i don't really understand how it works. >> >> What issues are you having? There are a number of tutorials and > examples >>> on > the site: > > http://displaytag.sourceforge.net/1.2/tut_basic.html > > Dave > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > >>> >>> -- >>> Jim Kiley >>> Senior Technical Consultant | Summa >>> [p] 412.258.3346 >>> http://www.summa-tech.com >>> >>> >> > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- André Diniz +55 (41) 9997-5567 e-mail alternativo: diniz...@msn.com
Re: pagination in struts2
http://displaytag.sourceforge.net/1.2/tut_externalSortAndPage.html It pays to really spend some time looking over existing documentation; it's often quicker than waiting for someone on a list or forum to answer. Dave Bhaarat Sharma wrote: jim, I found this example http://displaytag.homeip.net/displaytag-examples-1.2/example-paging.jsp?d-49653-p=1 it says "Ok, you have made a query that returns you back a list of 120 elements, but you don't want to show the user all 120 items at once, you want to allow them to page through the results (pretend 120 is really 1200 or 12000)." they are iterating through a long 12000 record list and then just putting that into pages. What I was looking for was something that would show 50 results of 12000 on first page then when NEXT is cliked, it against goes to DB to get next 50 records. On Wed, Apr 22, 2009 at 4:22 PM, Jim Kiley wrote: I found this within thirty seconds of clicking Dave's link: http://displaytag.sourceforge.net/1.2/tut_sources.html Note that the contents of this page are actually fairly freakin' horrible and should not be done on a grownup application. But the instructions are right there and easy to find. jk On Wed, Apr 22, 2009 at 4:18 PM, Bhaarat Sharma wrote: I wanted to use it for the purpose so that when I click NEXT or 2nd page then again I go to the DB to fetch next set of 50 records. but didnt see any examples of that sort On Wed, Apr 22, 2009 at 4:13 PM, Dave Newton wrote: Stefano Tranquillini wrote: someone has experience with this tag? i don't really understand how it works. What issues are you having? There are a number of tutorials and examples on the site: http://displaytag.sourceforge.net/1.2/tut_basic.html Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Jim Kiley Senior Technical Consultant | Summa [p] 412.258.3346 http://www.summa-tech.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: pagination in struts2
Have a look at the external sorting and pagination page[1] on the DisplayTag site. Also, take a look at the PaginatedList interface[2]. It takes a little bit to get your head around it. If you get stuck, the displaytag lists are pretty good at helping with the common issues. Andy. [1] http://displaytag.sourceforge.net/1.2/tut_externalSortAndPage.html [2] http://displaytag.sourceforge.net/1.2/displaytag/apidocs/org/displaytag/pagination/PaginatedList.html On 22 Apr 2009, at 22:27, Bhaarat Sharma wrote: jim, I found this example http://displaytag.homeip.net/displaytag-examples-1.2/example-paging.jsp?d-49653-p=1 it says "Ok, you have made a query that returns you back a list of 120 elements, but you don't want to show the user all 120 items at once, you want to allow them to page through the results (pretend 120 is really 1200 or 12000)." they are iterating through a long 12000 record list and then just putting that into pages. What I was looking for was something that would show 50 results of 12000 on first page then when NEXT is cliked, it against goes to DB to get next 50 records. On Wed, Apr 22, 2009 at 4:22 PM, Jim Kiley wrote: I found this within thirty seconds of clicking Dave's link: http://displaytag.sourceforge.net/1.2/tut_sources.html Note that the contents of this page are actually fairly freakin' horrible and should not be done on a grownup application. But the instructions are right there and easy to find. jk On Wed, Apr 22, 2009 at 4:18 PM, Bhaarat Sharma wrote: I wanted to use it for the purpose so that when I click NEXT or 2nd page then again I go to the DB to fetch next set of 50 records. but didnt see any examples of that sort On Wed, Apr 22, 2009 at 4:13 PM, Dave Newton wrote: Stefano Tranquillini wrote: someone has experience with this tag? i don't really understand how it works. What issues are you having? There are a number of tutorials and examples on the site: http://displaytag.sourceforge.net/1.2/tut_basic.html Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Jim Kiley Senior Technical Consultant | Summa [p] 412.258.3346 http://www.summa-tech.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: pagination in struts2
jim, I found this example http://displaytag.homeip.net/displaytag-examples-1.2/example-paging.jsp?d-49653-p=1 it says "Ok, you have made a query that returns you back a list of 120 elements, but you don't want to show the user all 120 items at once, you want to allow them to page through the results (pretend 120 is really 1200 or 12000)." they are iterating through a long 12000 record list and then just putting that into pages. What I was looking for was something that would show 50 results of 12000 on first page then when NEXT is cliked, it against goes to DB to get next 50 records. On Wed, Apr 22, 2009 at 4:22 PM, Jim Kiley wrote: > I found this within thirty seconds of clicking Dave's link: > http://displaytag.sourceforge.net/1.2/tut_sources.html > > Note that the contents of this page are actually fairly freakin' horrible > and should not be done on a grownup application. But the instructions are > right there and easy to find. > > jk > > On Wed, Apr 22, 2009 at 4:18 PM, Bhaarat Sharma > wrote: > > > I wanted to use it for the purpose so that when I click NEXT or 2nd page > > then again I go to the DB to fetch next set of 50 records. > > > > but didnt see any examples of that sort > > > > On Wed, Apr 22, 2009 at 4:13 PM, Dave Newton > > wrote: > > > > > Stefano Tranquillini wrote: > > > > > >> someone has experience with this tag? > > >> > > >> i don't really understand how it works. > > >> > > > > > > What issues are you having? There are a number of tutorials and > examples > > on > > > the site: > > > > > > http://displaytag.sourceforge.net/1.2/tut_basic.html > > > > > > Dave > > > > > > > > > > > > - > > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > > > > > -- > Jim Kiley > Senior Technical Consultant | Summa > [p] 412.258.3346 > http://www.summa-tech.com >
Re: pagination in struts2
I found this within thirty seconds of clicking Dave's link: http://displaytag.sourceforge.net/1.2/tut_sources.html Note that the contents of this page are actually fairly freakin' horrible and should not be done on a grownup application. But the instructions are right there and easy to find. jk On Wed, Apr 22, 2009 at 4:18 PM, Bhaarat Sharma wrote: > I wanted to use it for the purpose so that when I click NEXT or 2nd page > then again I go to the DB to fetch next set of 50 records. > > but didnt see any examples of that sort > > On Wed, Apr 22, 2009 at 4:13 PM, Dave Newton > wrote: > > > Stefano Tranquillini wrote: > > > >> someone has experience with this tag? > >> > >> i don't really understand how it works. > >> > > > > What issues are you having? There are a number of tutorials and examples > on > > the site: > > > > http://displaytag.sourceforge.net/1.2/tut_basic.html > > > > Dave > > > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > -- Jim Kiley Senior Technical Consultant | Summa [p] 412.258.3346 http://www.summa-tech.com
Re: pagination in struts2
I wanted to use it for the purpose so that when I click NEXT or 2nd page then again I go to the DB to fetch next set of 50 records. but didnt see any examples of that sort On Wed, Apr 22, 2009 at 4:13 PM, Dave Newton wrote: > Stefano Tranquillini wrote: > >> someone has experience with this tag? >> >> i don't really understand how it works. >> > > What issues are you having? There are a number of tutorials and examples on > the site: > > http://displaytag.sourceforge.net/1.2/tut_basic.html > > Dave > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: pagination in struts2
Stefano Tranquillini wrote: someone has experience with this tag? i don't really understand how it works. What issues are you having? There are a number of tutorials and examples on the site: http://displaytag.sourceforge.net/1.2/tut_basic.html Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: pagination in struts2
someone has experience with this tag? i don't really understand how it works. On Tue, Apr 21, 2009 at 18:39, Chris Pratt wrote: > I'd suggest looking into DisplayTag (http://displaytag.sourceforge.net/) > (*Chris*) > > On Tue, Apr 21, 2009 at 4:58 AM, Bhaarat Sharma > wrote: > > > Are there any examples that show how to do pagination in struts2? > > > > I would like to do pagination where we call the DB again when the user > > clicks on one of the page numbers. > > > -- Stefano
Re: pagination in struts2
I'd suggest looking into DisplayTag (http://displaytag.sourceforge.net/) (*Chris*) On Tue, Apr 21, 2009 at 4:58 AM, Bhaarat Sharma wrote: > Are there any examples that show how to do pagination in struts2? > > I would like to do pagination where we call the DB again when the user > clicks on one of the page numbers. >
Re: Pagination with struts 2.x
displayTag is not terrible when working with Struts propertiesthese days. Remember that you can get to stuff on the value stack via JSTL expressions as well. Which works well with displayTag. Mileidys Gonzalez Prieto wrote: > > I recomend jMesa... is very good and is possible to do pagination with > Ajax using limits. > > On Wed, 2009-03-25 at 05:37 -0700, mahanare wrote: >> FYI, >> just recording my experience here. >> >> I looked at displaytag it looks good but if there are some minor changes >> (it >> encodes property names etc so when you post for sort/pagination, setting >> the >> structs 2 action properties is difficult) other wise it looks simple. >> >> Also I looked at jqGrid using jquery, it might take some effort but we >> really get flashy UI. Also there is some thing called hdpagination >> another >> taglibrary. >> >> at the end as we have some complex stuff, we decided not to use these >> libraries and write code on our own to meet our specific requirements. >> >> Thanks >> Harinath >> >> >> Chris Pratt wrote: >> > >> > One very popular option is DisplayTag (http://www.displaytag.org/). >> > (*Chris*) >> > >> > On Wed, Mar 18, 2009 at 11:08 PM, mahanare wrote: >> > >> >> >> >> Hi, >> >> >> >> What is the best approach to display database table content page wise >> >> using >> >> struts 2? >> >> >> >> We used display tag few years back, but there seems another taglib >> pager >> >> taglib. >> >> >> >> Is pager tag lib a better option or is there any inherent support in >> >> struts >> >> 2 for paging? >> >> >> >> Thanks >> >> harinath >> >> >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/Pagination-with-struts-2.x-tp22594233p22594233.html >> >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> >> >> >> - >> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> >> >> > >> > >> > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Pagination-with-struts-2.x-tp22594233p22713851.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination with struts 2.x
I recomend jMesa... is very good and is possible to do pagination with Ajax using limits. On Wed, 2009-03-25 at 05:37 -0700, mahanare wrote: > FYI, > just recording my experience here. > > I looked at displaytag it looks good but if there are some minor changes (it > encodes property names etc so when you post for sort/pagination, setting the > structs 2 action properties is difficult) other wise it looks simple. > > Also I looked at jqGrid using jquery, it might take some effort but we > really get flashy UI. Also there is some thing called hdpagination another > taglibrary. > > at the end as we have some complex stuff, we decided not to use these > libraries and write code on our own to meet our specific requirements. > > Thanks > Harinath > > > Chris Pratt wrote: > > > > One very popular option is DisplayTag (http://www.displaytag.org/). > > (*Chris*) > > > > On Wed, Mar 18, 2009 at 11:08 PM, mahanare wrote: > > > >> > >> Hi, > >> > >> What is the best approach to display database table content page wise > >> using > >> struts 2? > >> > >> We used display tag few years back, but there seems another taglib pager > >> taglib. > >> > >> Is pager tag lib a better option or is there any inherent support in > >> struts > >> 2 for paging? > >> > >> Thanks > >> harinath > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Pagination-with-struts-2.x-tp22594233p22594233.html > >> Sent from the Struts - User mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > >> > >> > > > > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination with struts 2.x
FYI, just recording my experience here. I looked at displaytag it looks good but if there are some minor changes (it encodes property names etc so when you post for sort/pagination, setting the structs 2 action properties is difficult) other wise it looks simple. Also I looked at jqGrid using jquery, it might take some effort but we really get flashy UI. Also there is some thing called hdpagination another taglibrary. at the end as we have some complex stuff, we decided not to use these libraries and write code on our own to meet our specific requirements. Thanks Harinath Chris Pratt wrote: > > One very popular option is DisplayTag (http://www.displaytag.org/). > (*Chris*) > > On Wed, Mar 18, 2009 at 11:08 PM, mahanare wrote: > >> >> Hi, >> >> What is the best approach to display database table content page wise >> using >> struts 2? >> >> We used display tag few years back, but there seems another taglib pager >> taglib. >> >> Is pager tag lib a better option or is there any inherent support in >> struts >> 2 for paging? >> >> Thanks >> harinath >> >> -- >> View this message in context: >> http://www.nabble.com/Pagination-with-struts-2.x-tp22594233p22594233.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > -- View this message in context: http://www.nabble.com/Pagination-with-struts-2.x-tp22594233p22700830.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination and s:subset
Hi Andy, i was always working with my home made paginators, actualy one for S1 and one for S2, one reason is i'm working with no standard database solutions, and the other that pagination fragment is just a few line of jsp code that can be included any where in your apps plus some kind of convention for actions or forms. So if You will do it yourself you will have all the control over how it behaves. But that's just my point of view. Best greetings, Paweł Wielgus. 2009/3/21 Andy Sykes : > Hi list, > > After bodging my way through some pagination for a project I'm working on > with a combination of OGNL expressions, s:subset and s:iterator, I was > wondering if anyone had given any serious thought to the practicality of > implementing displaytag-style pagination in S2 tags? > > Display tag is fabulous if you're working in tables; if you're not, it's a > pain in the butt. You either have to roll your own pagination, which is a > drag, or do a kludgy hack based on TableDecorators. If I'm missing > something, please let me know! > > I've not brain-mapped exactly how I'd go about it, but I'm fairly sure of > the general idea. Has anyone thought through this and seen potential > show-stoppers? > > Cheers, > Andy. > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Pagination with struts 2.x
One very popular option is DisplayTag (http://www.displaytag.org/). (*Chris*) On Wed, Mar 18, 2009 at 11:08 PM, mahanare wrote: > > Hi, > > What is the best approach to display database table content page wise using > struts 2? > > We used display tag few years back, but there seems another taglib pager > taglib. > > Is pager tag lib a better option or is there any inherent support in struts > 2 for paging? > > Thanks > harinath > > -- > View this message in context: > http://www.nabble.com/Pagination-with-struts-2.x-tp22594233p22594233.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
RE: Pagination Questions
I agreeunless absolutely necessary caching data from the DB guarantees your data will be inconsistent with your last DB snapshot If you're running out of cursors use the right cursor SELECT instead of updateIf you're running out of connections use connection-pools...there are plenty avaialble for any DB implementation Dave?Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Mon, 1 Dec 2008 09:40:50 +0800> From: [EMAIL PROTECTED]> To: user@struts.apache.org> Subject: Re: Pagination Questions> > Hi Adam,> Thanks for your reply. I am doing pagination like this now since I found> that using index to do searching from a range of record is quite fast, much> faster than I thought before. So I just use your suggested solution.> > > 2008/11/30 Adam Ruggles <[EMAIL PROTECTED]>> > >> > Personally I think it would be a bad idea to buffer the data from the db,> > since most users when performing a search will only look at the first page> > of results. It would be better to simply return a limited set of results> > from the DB. Otherwise you might be fetching data the user will never see.> >> > What I usually do is create an object that stores a list of the current> > result set and the total number of results. This object I create in the> > data layer and requires two db calls. One to get a limited list of results> > and the second to get the total item count.> >> > In the action I have an offset and resultsPerPage variable that I pass to> > my> > data layer. I don't know what database you're using but most allow you to> > limit the results, using an offset and number of results.> >> >> > KE LI-2 wrote:> > >> > > Dear All,> > > I am currently working on pagination to the result of search result. I> > > want to ask which solution is better?> > > 1. After user chooses some criterias and then clicks the search> > > button, the server will return the size of search result and the> > > objects of first page of the search result. Then when user clicks the> > > different page number, the server will get the data for that page from> > > DB. But for this solution, it requires DB access when you click the> > > page number.> > >> > > 2.After user clicks the search button, the server will get all the> > > objects(like all the films which the user wanna.). Then when user> > > clicks different page number, the server will just return the data> > > from memory. This seems to reduce the DB access times.> > >> > > 3. Use some preload method to store the data for the next few pages in> > > a buffer.> > >> > > Which solution will achieve a fast search and reduce the access load> > > to the DB?> > >> > > Thanks a lot for your feedback!> > >> > > Li, Ke (Licco)> > >> > > -> > > To unsubscribe, e-mail: [EMAIL PROTECTED]> > > For additional commands, e-mail: [EMAIL PROTECTED]> > >> > >> > >> >> > --> > View this message in context:> > http://www.nabble.com/Pagination-Questions-tp20744884p20749894.html> > Sent from the Struts - User mailing list archive at Nabble.com.> >> >> > -> > To unsubscribe, e-mail: [EMAIL PROTECTED]> > For additional commands, e-mail: [EMAIL PROTECTED]> >> >> > > -- > Best Regards,> Licco _ Access your email online and on the go with Windows Live Hotmail. http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_access_112008
Re: Pagination Questions
Hi Adam, Thanks for your reply. I am doing pagination like this now since I found that using index to do searching from a range of record is quite fast, much faster than I thought before. So I just use your suggested solution. 2008/11/30 Adam Ruggles <[EMAIL PROTECTED]> > > Personally I think it would be a bad idea to buffer the data from the db, > since most users when performing a search will only look at the first page > of results. It would be better to simply return a limited set of results > from the DB. Otherwise you might be fetching data the user will never see. > > What I usually do is create an object that stores a list of the current > result set and the total number of results. This object I create in the > data layer and requires two db calls. One to get a limited list of results > and the second to get the total item count. > > In the action I have an offset and resultsPerPage variable that I pass to > my > data layer. I don't know what database you're using but most allow you to > limit the results, using an offset and number of results. > > > KE LI-2 wrote: > > > > Dear All, > > I am currently working on pagination to the result of search result. I > > want to ask which solution is better? > > 1. After user chooses some criterias and then clicks the search > > button, the server will return the size of search result and the > > objects of first page of the search result. Then when user clicks the > > different page number, the server will get the data for that page from > > DB. But for this solution, it requires DB access when you click the > > page number. > > > > 2.After user clicks the search button, the server will get all the > > objects(like all the films which the user wanna.). Then when user > > clicks different page number, the server will just return the data > > from memory. This seems to reduce the DB access times. > > > > 3. Use some preload method to store the data for the next few pages in > > a buffer. > > > > Which solution will achieve a fast search and reduce the access load > > to the DB? > > > > Thanks a lot for your feedback! > > > > Li, Ke (Licco) > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/Pagination-Questions-tp20744884p20749894.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Best Regards, Licco
Re: Pagination Questions
Personally I think it would be a bad idea to buffer the data from the db, since most users when performing a search will only look at the first page of results. It would be better to simply return a limited set of results from the DB. Otherwise you might be fetching data the user will never see. What I usually do is create an object that stores a list of the current result set and the total number of results. This object I create in the data layer and requires two db calls. One to get a limited list of results and the second to get the total item count. In the action I have an offset and resultsPerPage variable that I pass to my data layer. I don't know what database you're using but most allow you to limit the results, using an offset and number of results. KE LI-2 wrote: > > Dear All, > I am currently working on pagination to the result of search result. I > want to ask which solution is better? > 1. After user chooses some criterias and then clicks the search > button, the server will return the size of search result and the > objects of first page of the search result. Then when user clicks the > different page number, the server will get the data for that page from > DB. But for this solution, it requires DB access when you click the > page number. > > 2.After user clicks the search button, the server will get all the > objects(like all the films which the user wanna.). Then when user > clicks different page number, the server will just return the data > from memory. This seems to reduce the DB access times. > > 3. Use some preload method to store the data for the next few pages in > a buffer. > > Which solution will achieve a fast search and reduce the access load > to the DB? > > Thanks a lot for your feedback! > > Li, Ke (Licco) > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Pagination-Questions-tp20744884p20749894.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pagination problem with struts2,Please Please help me.
One of my samples: <%@ taglib prefix="s" uri="/struts-tags"%> <%@ taglib prefix="display" uri="http://displaytag.sf.net"%> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"; %> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"; %> http://www.w3.org/TR/html4/loose.dtd";> Insert title here Method in action class: public String index(){ employeeList = this.employeeDAO.findAll(); return SUCCESS; } 2008/5/26 Musachy Barroso <[EMAIL PROTECTED]>: > Are you sure there is data on that list? try this on your page > > > > musachy > > On Mon, May 26, 2008 at 12:53 AM, Varun Deep <[EMAIL PROTECTED]> > wrote: > > Request to All > > > > I am using pagination with display tag in struts2. Following is the code > > I included in my jsp file. > > I also include all the jar file. And tld files. In the respective > > folders > > 1.try > > <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %> > > > > The EmployeeList is coming from the Action file. > > > > > > > id="row"> > > > > > > I also include all the jar file. And tld files. In the respective > > folders. And using them as necessary. > > > > > > > > I also try to perform the following code: > > > > 2. try > > > > Web.xml > > > > > > > > http://displaytag.sf.net > > > > displaytag.tld > > > > > > > > employee. Jsp > > > > <%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %> > > > > > > > id="row"> > > > > > > I also include all the jar file. And tld files. In the respective > > folders. And using them as necessary. > > > > > > - > > 3. try > > Web.xml > > > > > > > > /WEB-INF/displaytag.tld > > > > displaytag.tld > > > > > > > > employee. Jsp > > > > <%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %> > > > > > > > id="row"> > > > > > > I also include all the jar file. And tld files. In the respective > > folders. And using them as necessary. > > > > > > - > > > > 4. try > > > > Web.xml > > > > > > > > http://displaytag.sf.net > > > > displaytag.tld > > > > > > > > employee. Jsp > > > > <%@ taglib uri=" http://displaytag.sf.net"; prefix="display" %> > > > > > > > id="row"> > > > > > > I also include all the jar file. And tld files. In the respective > > folders. And using them as necessary. > > > > > > -- > > Problem. > > > > But it shows nothing, not even any error message. > > > > Please Please help me. And suggest me how I have to move > > > > Thanks in advance > > > > Varun > > > > > > -- > "Hey you! Would you help me to carry the stone?" Pink Floyd > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jherald Gerome Lacambra
Yes RE: Pagination problem with struts2,Please Please help me.
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, May 25, 2008 10:17 PM To: 'Struts Users Mailing List' Subject: RE: Pagination problem with struts2,Please Please help me. Yes, giving value 8 for this. -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: Sunday, May 25, 2008 10:07 PM To: Struts Users Mailing List Subject: Re: Pagination problem with struts2,Please Please help me. Are you sure there is data on that list? try this on your page musachy On Mon, May 26, 2008 at 12:53 AM, Varun Deep <[EMAIL PROTECTED]> wrote: > Request to All > > I am using pagination with display tag in struts2. Following is the code > I included in my jsp file. > I also include all the jar file. And tld files. In the respective > folders > 1.try > <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %> > > The EmployeeList is coming from the Action file. > > > id="row"> > > > I also include all the jar file. And tld files. In the respective > folders. And using them as necessary. > > > > I also try to perform the following code: > > 2. try > > Web.xml > > > > http://displaytag.sf.net > > displaytag.tld > > > > employee. Jsp > > <%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %> > > > id="row"> > > > I also include all the jar file. And tld files. In the respective > folders. And using them as necessary. > > > - > 3. try > Web.xml > > > > /WEB-INF/displaytag.tld > > displaytag.tld > > > > employee. Jsp > > <%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %> > > > id="row"> > > > I also include all the jar file. And tld files. In the respective > folders. And using them as necessary. > > > - > > 4. try > > Web.xml > > > > http://displaytag.sf.net > > displaytag.tld > > > > employee. Jsp > > <%@ taglib uri=" http://displaytag.sf.net"; prefix="display" %> > > > id="row"> > > > I also include all the jar file. And tld files. In the respective > folders. And using them as necessary. > > > -- > Problem. > > But it shows nothing, not even any error message. > > Please Please help me. And suggest me how I have to move > > Thanks in advance > > Varun > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - 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]
RE: Pagination problem with struts2,Please Please help me.
Yes, giving value 8 for this. -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: Sunday, May 25, 2008 10:07 PM To: Struts Users Mailing List Subject: Re: Pagination problem with struts2,Please Please help me. Are you sure there is data on that list? try this on your page musachy On Mon, May 26, 2008 at 12:53 AM, Varun Deep <[EMAIL PROTECTED]> wrote: > Request to All > > I am using pagination with display tag in struts2. Following is the code > I included in my jsp file. > I also include all the jar file. And tld files. In the respective > folders > 1.try > <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %> > > The EmployeeList is coming from the Action file. > > > id="row"> > > > I also include all the jar file. And tld files. In the respective > folders. And using them as necessary. > > > > I also try to perform the following code: > > 2. try > > Web.xml > > > > http://displaytag.sf.net > > displaytag.tld > > > > employee. Jsp > > <%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %> > > > id="row"> > > > I also include all the jar file. And tld files. In the respective > folders. And using them as necessary. > > > - > 3. try > Web.xml > > > > /WEB-INF/displaytag.tld > > displaytag.tld > > > > employee. Jsp > > <%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %> > > > id="row"> > > > I also include all the jar file. And tld files. In the respective > folders. And using them as necessary. > > > - > > 4. try > > Web.xml > > > > http://displaytag.sf.net > > displaytag.tld > > > > employee. Jsp > > <%@ taglib uri=" http://displaytag.sf.net"; prefix="display" %> > > > id="row"> > > > I also include all the jar file. And tld files. In the respective > folders. And using them as necessary. > > > -- > Problem. > > But it shows nothing, not even any error message. > > Please Please help me. And suggest me how I have to move > > Thanks in advance > > Varun > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - 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: Pagination problem with struts2,Please Please help me.
Are you sure there is data on that list? try this on your page musachy On Mon, May 26, 2008 at 12:53 AM, Varun Deep <[EMAIL PROTECTED]> wrote: > Request to All > > I am using pagination with display tag in struts2. Following is the code > I included in my jsp file. > I also include all the jar file. And tld files. In the respective > folders > 1.try > <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %> > > The EmployeeList is coming from the Action file. > > > id="row"> > > > I also include all the jar file. And tld files. In the respective > folders. And using them as necessary. > > > > I also try to perform the following code: > > 2. try > > Web.xml > > > > http://displaytag.sf.net > > displaytag.tld > > > > employee. Jsp > > <%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %> > > > id="row"> > > > I also include all the jar file. And tld files. In the respective > folders. And using them as necessary. > > > - > 3. try > Web.xml > > > > /WEB-INF/displaytag.tld > > displaytag.tld > > > > employee. Jsp > > <%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %> > > > id="row"> > > > I also include all the jar file. And tld files. In the respective > folders. And using them as necessary. > > > - > > 4. try > > Web.xml > > > > http://displaytag.sf.net > > displaytag.tld > > > > employee. Jsp > > <%@ taglib uri=" http://displaytag.sf.net"; prefix="display" %> > > > id="row"> > > > I also include all the jar file. And tld files. In the respective > folders. And using them as necessary. > > > -- > Problem. > > But it shows nothing, not even any error message. > > Please Please help me. And suggest me how I have to move > > Thanks in advance > > Varun > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pagination in Struts2
I want the results in google format.Any help would be appreciated. Thanks, Aarthy balart wrote: > > Hi Aarthy, > > you can use the displaytag to implement the pagination in struts2. > > kindly tell that, Pagination as in Google? how, you want the page no in > google format or result in google format. > > Regards,' > Bala > > Jaarthy wrote: >> >> Hi, >> >> How to implement pagination as in Google in Struts2?Any Help would be >> appreciated. >> >> Thanks, >> Aarthy >> > > -- View this message in context: http://www.nabble.com/Pagination-in-Struts2-tp15619264p16991738.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pagination in Struts2
Hi Aarthy, you can use the displaytag to implement the pagination in struts2. kindly tell that, Pagination as in Google? how, you want the page no in google format or result in google format. Regards,' Bala Jaarthy wrote: > > Hi, > > How to implement pagination as in Google in Struts2?Any Help would be > appreciated. > > Thanks, > Aarthy > -- View this message in context: http://www.nabble.com/Pagination-in-Struts2-tp15619264p16807472.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pagination in Struts2
hi, As I said in the previous email. A straightforward way using displaytag would be defining a one-column table and define a decorator that will produce the free format you want to produce. If you configure displaytag to not show borders (look in displaytag css) and also configure the header then you can get it to look almost like Google i.e. it won't look as a table but internally is one-column table. regards, Giovanni Jaarthy wrote: Hi Giovanni, I want the results to be dislayed as they are in the Google Search results page,not in a table form.Any help please? Thanks, Aarthy Giovanni Azua-3 wrote: hi, I use displaytag (http://displaytag.sourceforge.net). If you can live without a natively AJAX-enabled pagination library, displaytag is excellent. I like very much the concept of display Decorators, produces a very clean design and perfect separation of concerns. Workarounds exist to AJAXify displaytag (AjaxAnywhere, AjaxTags) http://demo.raibledesigns.com/appfuse-light-ajax/users.html http://raibledesigns.com/rd/entry/the_future_of_the_displaytag http://ajaxtags.sourceforge.net/usage.html I don't use any of these myself, though. The other choice you have I think is tabletags (http://code.google.com/p/tabletags/). The aim seems to provide the same functionality as displaytag but integrating better with Struts 2 e.g. seems to use the same template-based concept and therefore you can customize it entirely. But AFAIK it does not offer yet automatic paging like displaytag does see: http://code.google.com/p/tabletags/issues/detail?id=10 I tried to adopt tabletags at first but it is too at an early stage yet i.e. lacks lot of functionality that displaytag currently offers out of the box. HTH, Best regards, Giovanni PS: there are lot of people subscribed to this list that are involved with those projects and could give a more educated guidance on differences among these two. Jaarthy wrote: Hi, How to implement pagination as in Google in Struts2?Any Help would be appreciated. Thanks, Aarthy - 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: Pagination in Struts2
Hi Giovanni, I want the results to be dislayed as they are in the Google Search results page,not in a table form.Any help please? Thanks, Aarthy Giovanni Azua-3 wrote: > > hi, > > I use displaytag (http://displaytag.sourceforge.net). If you can live > without a natively AJAX-enabled pagination library, displaytag is > excellent. I like very much the concept of display Decorators, produces > a very clean design and perfect separation of concerns. > > Workarounds exist to AJAXify displaytag (AjaxAnywhere, AjaxTags) > http://demo.raibledesigns.com/appfuse-light-ajax/users.html > http://raibledesigns.com/rd/entry/the_future_of_the_displaytag > http://ajaxtags.sourceforge.net/usage.html > > I don't use any of these myself, though. > > The other choice you have I think is tabletags > (http://code.google.com/p/tabletags/). The aim seems to provide the same > functionality as displaytag but integrating better with Struts 2 e.g. > seems to use the same template-based concept and therefore you can > customize it entirely. But AFAIK it does not offer yet automatic paging > like displaytag does see: > http://code.google.com/p/tabletags/issues/detail?id=10 > > I tried to adopt tabletags at first but it is too at an early stage yet > i.e. lacks lot of functionality that displaytag currently offers out of > the box. > > HTH, > Best regards, > Giovanni > > PS: there are lot of people subscribed to this list that are involved > with those projects and could give a more educated guidance on > differences among these two. > > Jaarthy wrote: >> Hi, >> >> How to implement pagination as in Google in Struts2?Any Help would be >> appreciated. >> >> Thanks, >> Aarthy >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Pagination-in-Struts2-tp15619264p15634448.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pagination in Struts2
Using displaytag defining a 1-column table, no borders, and the right Decorator implementation you get your table-less Google. But OK then you would risk having a Decorator producing HTML, though this could be avoided by using some template-based framework e.g. velocity. regards, Giovanni Adam Hardy wrote: Just thought it's worth pointing out that displaytag does tables, whereas google search results are actually table-less. I'd be very interested if anyone knows whether displaytag or any other project is or will offer a table-less solution. There are so many extras that would be nice to have for pagination, I would gladly swap my own quick'n'dirty implementation for something 3rd party. Adam Giovanni Azua on 22/02/08 09:47, wrote: hi, I use displaytag (http://displaytag.sourceforge.net). If you can live without a natively AJAX-enabled pagination library, displaytag is excellent. I like very much the concept of display Decorators, produces a very clean design and perfect separation of concerns. Workarounds exist to AJAXify displaytag (AjaxAnywhere, AjaxTags) http://demo.raibledesigns.com/appfuse-light-ajax/users.html http://raibledesigns.com/rd/entry/the_future_of_the_displaytag http://ajaxtags.sourceforge.net/usage.html I don't use any of these myself, though. The other choice you have I think is tabletags (http://code.google.com/p/tabletags/). The aim seems to provide the same functionality as displaytag but integrating better with Struts 2 e.g. seems to use the same template-based concept and therefore you can customize it entirely. But AFAIK it does not offer yet automatic paging like displaytag does see: http://code.google.com/p/tabletags/issues/detail?id=10 I tried to adopt tabletags at first but it is too at an early stage yet i.e. lacks lot of functionality that displaytag currently offers out of the box. HTH, Best regards, Giovanni PS: there are lot of people subscribed to this list that are involved with those projects and could give a more educated guidance on differences among these two. Jaarthy wrote: Hi, How to implement pagination as in Google in Struts2?Any Help would be appreciated. - 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: Pagination in Struts2
Just thought it's worth pointing out that displaytag does tables, whereas google search results are actually table-less. I'd be very interested if anyone knows whether displaytag or any other project is or will offer a table-less solution. There are so many extras that would be nice to have for pagination, I would gladly swap my own quick'n'dirty implementation for something 3rd party. Adam Giovanni Azua on 22/02/08 09:47, wrote: hi, I use displaytag (http://displaytag.sourceforge.net). If you can live without a natively AJAX-enabled pagination library, displaytag is excellent. I like very much the concept of display Decorators, produces a very clean design and perfect separation of concerns. Workarounds exist to AJAXify displaytag (AjaxAnywhere, AjaxTags) http://demo.raibledesigns.com/appfuse-light-ajax/users.html http://raibledesigns.com/rd/entry/the_future_of_the_displaytag http://ajaxtags.sourceforge.net/usage.html I don't use any of these myself, though. The other choice you have I think is tabletags (http://code.google.com/p/tabletags/). The aim seems to provide the same functionality as displaytag but integrating better with Struts 2 e.g. seems to use the same template-based concept and therefore you can customize it entirely. But AFAIK it does not offer yet automatic paging like displaytag does see: http://code.google.com/p/tabletags/issues/detail?id=10 I tried to adopt tabletags at first but it is too at an early stage yet i.e. lacks lot of functionality that displaytag currently offers out of the box. HTH, Best regards, Giovanni PS: there are lot of people subscribed to this list that are involved with those projects and could give a more educated guidance on differences among these two. Jaarthy wrote: Hi, How to implement pagination as in Google in Struts2?Any Help would be appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pagination in Struts2
hi, I use displaytag (http://displaytag.sourceforge.net). If you can live without a natively AJAX-enabled pagination library, displaytag is excellent. I like very much the concept of display Decorators, produces a very clean design and perfect separation of concerns. Workarounds exist to AJAXify displaytag (AjaxAnywhere, AjaxTags) http://demo.raibledesigns.com/appfuse-light-ajax/users.html http://raibledesigns.com/rd/entry/the_future_of_the_displaytag http://ajaxtags.sourceforge.net/usage.html I don't use any of these myself, though. The other choice you have I think is tabletags (http://code.google.com/p/tabletags/). The aim seems to provide the same functionality as displaytag but integrating better with Struts 2 e.g. seems to use the same template-based concept and therefore you can customize it entirely. But AFAIK it does not offer yet automatic paging like displaytag does see: http://code.google.com/p/tabletags/issues/detail?id=10 I tried to adopt tabletags at first but it is too at an early stage yet i.e. lacks lot of functionality that displaytag currently offers out of the box. HTH, Best regards, Giovanni PS: there are lot of people subscribed to this list that are involved with those projects and could give a more educated guidance on differences among these two. Jaarthy wrote: Hi, How to implement pagination as in Google in Struts2?Any Help would be appreciated. Thanks, Aarthy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: pagination problem pls rectify this error its very urgent for me
--- jalal udeen <[EMAIL PROTECTED]> wrote: > I have to use pagination in jsp so i did it with > logic:iterate tag as follows One reason you may not be getting an answer is that this has nothing to do with Struts. > <% > String strOffset ="0"; > if(request.getParameter("pagination")!=null) > strOffset=request.getParameter("pagination"); > else > strOffset ="0"; > String strLength = "2"; > int increment = Integer.parseInt(strOffset) + > Integer.parseInt(strLength) > ; > String strIncOffset = String.valueOf(increment); > ArrayList list > =(ArrayList)request.getAttribute("pattern"); > int size= list.size(); > > if((Integer.parseInt(strIncOffset)>= size)) > strIncOffset ="0"; > > %> (The following is my opinion and probably does not reflect the views of the rest of the Struts mailing list.) I started to look at the code, but it was too weird for me--it would not have survived even the most cursory of code reviews. That made me even less likely to want to answer the question. What I would suggest doing (besides cleaning up the code) is, on paper, write down a few test cases, focusing on the edge case which is giving you problems at the moment. Build a truth table using your values and the logical conditions you have and see why they might be failing. If I don't have anything else to do at work today perhaps I'll suck it up and take another look at it and you can buy me a Kingfisher. d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pagination
Don't forget SourceForge's ValueList: http://valuelist.sourceforge.net/ -David -Original Message- From: Lance [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:49 AM To: 'Struts Users Mailing List' Subject: RE: pagination Displaytag will do it http://displaytag.sourceforge.net/11/displaytag/tagreference.html See the pagesize attribute. -Original Message- From: Medicherla Lakshmi [mailto:[EMAIL PROTECTED] Sent: 01 August 2006 08:20 To: user@struts.apache.org Subject: pagination Hi All, Am using struts in my project. Can anyone tel me how to implement pagination in struts. I dont have any idea how to do that. Any links or examples will be of great value. Thanks in Advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pagination
Displaytag will do it http://displaytag.sourceforge.net/11/displaytag/tagreference.html See the pagesize attribute. -Original Message- From: Medicherla Lakshmi [mailto:[EMAIL PROTECTED] Sent: 01 August 2006 08:20 To: user@struts.apache.org Subject: pagination Hi All, Am using struts in my project. Can anyone tel me how to implement pagination in struts. I dont have any idea how to do that. Any links or examples will be of great value. Thanks in Advance. - Here's a new way to find what you're looking for - Yahoo! Answers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pagination
http://www.google.com/search?q=struts+example+pagination the fisrt result on javaworld pretty looks like what you need:/ On 8/1/06, Medicherla Lakshmi <[EMAIL PROTECTED]> wrote: Hi All, Am using struts in my project. Can anyone tel me how to implement pagination in struts. I dont have any idea how to do that. Any links or examples will be of great value. Thanks in Advance. - Here's a new way to find what you're looking for - Yahoo! Answers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pagination
for Displaytag, yes you will... -Original Message- From: Rafael Taboada [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 5:03 PM Cc: Struts Users Mailing List Subject: Re: Pagination Hi folks. Thanks for ur help. Those projects are so cool... But i have built all my jsp and used taglibs... If I decide to use this tags. Does it mean I have to rebuild my jsps?. -- Rafael Taboada - 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: Pagination
Hi folks. Thanks for ur help. Those projects are so cool... But i have built all my jsp and used taglibs... If I decide to use this tags. Does it mean I have to rebuild my jsps?. -- Rafael Taboada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pagination
take a look at Displaytag: http://displaytag.sourceforge.net/ -Original Message- From: Rafael Taboada [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 8:11 AM To: Struts List Subject: Pagination Hi folks, i'm again :) with my list of customers. I could do my CRUD approach. So thank u for ur help. My question is if there is some approach to do pagination with struts. I don't know, maybe a plugin, extention... Thanks again -- Rafael Taboada - 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: Pagination
have a look to struts-layout and its "collection" tags http://struts.application-servers.com/doc/index.html hope it helps - Original Message - From: "Rafael Taboada" <[EMAIL PROTECTED]> To: "Struts List" Sent: Thursday, April 21, 2005 3:10 PM Subject: Pagination Hi folks, i'm again :) with my list of customers. I could do my CRUD approach. So thank u for ur help. My question is if there is some approach to do pagination with struts. I don't know, maybe a plugin, extention... Thanks again -- Rafael Taboada - 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: Pagination of Query Results Without Getting All Results At On ce
Not unless you want to do something via proxy or a ListAdaptor to your DataSource. Extend AbstractList and override methods to load additional items from a transiently referenced datasource or service that can be looked up. We use this for our application where we have lots of data that we want to show for search results, but our initial selection, we just load a set of primary keys, and depending on the page of items to be shown, we lazy load additional objects from the DB by accessing a Service through a ServiceLocator. Jacob Hookom Senior Analyst/Programmer McKesson Medical-Surgical -Original Message- From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 4:19 PM To: Struts Users Mailing List Subject: Pagination of Query Results Without Getting All Results At Once I am working on an application with a page that uses pager-taglib to break down query results so that only ten show up on each page. However, as far as I can tell, this tag library assumes that all the query results have been retrieved from the database. I have been tasked with modifying the app so that only the results that are actually displayed are retrieved (i.e., query per page view). I wanted to see if there is an easy way to do this before writing a solution from scratch. Is my assumption that pager-taglib cannot be used correct? Thanks, -d __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - 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: Pagination
The only features provided in struts are in the tag using a combination of the "length" and "offset" attributes. So for example if you were showing "pages of ten" and wanted to show the "second page".. Niall - Original Message - From: "Steven Leija" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, April 20, 2004 7:43 PM Subject: Pagination > Hello All, > > Is there any sort of a util class that is used for pagination already provided by struts or jakarta? > > Thanks! > > Steven > > > - > 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: Pagination
No, but check out displaytag at http://www.displaytag.org Steven Leija wrote: Hello All, Is there any sort of a util class that is used for pagination already provided by struts or jakarta? Thanks! Steven - 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]