RE: has anyone gotten JSPTag's pager to work without using sessions?
Hi Dean, Yep - I'm using it without sessions. Just code the pg:pager url attribute to be your action mapping e.g. /action.do This will ensure that your action gets called again when you page through the results. Just get your action to put the required data into the request. HTH Malc -Original Message- From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]] Sent: 02 October 2002 15:01 To: '[EMAIL PROTECTED]' Subject: has anyone gotten JSPTag's pager to work without using sessions? has anyone gotten JSPTag's pager to work without using sessions? Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] * The information contained in this message or any of its attachments may be privileged and confidential and intended for the exclusive use of the addressee. If you are not the addressee any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: logic:iterate enhacement proposal
Adolfo, You could also try the pager taglib available at http://jsptags.com/tags/navigation/pager/ Works well with logic:iterate. Just a thought! Malc -Original Message- From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]] Sent: 17 July 2002 11:31 To: [EMAIL PROTECTED] Subject: logic:iterate enhacement proposal Hi All, I have been trying to display in the JSP a long set of results from a query to database. Results will be displayed with a usual html table tag. No problem to display the whole bunch of results in a single JSP. In the other hand, parameters offset and length allow us to choose a subset in the collection to render. The problem appears, when we want to display such a results spread along different pages, I mean, with a pagination mechanism. As length and offset has fixed values for the JSP, I have not found a way to scroll up and down in the collection. We have fixed this issue, by overriding logic:iterate, and allowing the tag to load offset from a request parameter, previously to the parameter defined in the tag in the JSP. Now, by sending the query to the same JSP and appending a parameter offset in the query string, we can scroll, since tag gives preference to the offset parameter from the request to the one in the JSP. Some lines of javascript to generate the right links with the appended offset parameter to the query string make the trick. Would be this addition interesting for Struts logic:iterate tag? It is a quite simple enhacement, and does not modify at all the current behaviour. It is just an idea. Regards, Adolfo. HTML HEAD TITLEAdolfo's signature/TITLE /HEAD BODY centerbemAdolfo Rodriguez Miguelez/emb/center /BODY /HTML _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] * The information contained in this message or any of its attachments may be privileged and confidential and intended for the exclusive use of the addressee. If you are not the addressee any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: paging taglib and struts?
John, I am using this taglib quite extensively and it works very well with Struts. Below is a fairly basic example jsp. Essentially, the pager url attribute specifies the destination when any of the navigation links is clicked. Request parameters required by the action class can be specified using the param tag. These can be literals (value=search) as in my example or use bean:define and specify the value attribute as the resulting variable (value=%=expr%). The item tag defines each row to be displayed, and needs to be enclosed within logic:iterate. The index tag defines the navigation bar (prev, next etc) as a series of hyperlinks. The maxIndexPages attribute of the pager tag defines how many page numbers will be displayed in the navigation bar, i.e the below example will display [Prev] 1 2 3 4 5 6 7 8 9 10 [Next] assuming there are 10 pages worth of data. [Prev] and [Next] only display if there are previous or more pages. The maxPageItems attribute specifies how many detail rows per page to be displayed. I'm happy to answer any further questions or give examples. Cheers Malc pg:pager url=AdvancedSearch.do maxIndexPages=10 maxPageItems=15 pg:param name=action value=search/ TABLE width=100% TR TD align=center TABLE width=60% border=0 TR TH width=10%bean:message key=partnum.ecnsearchresults.ecnid//TH TH width=20%bean:message key=partnum.ecnsearchresults.model//TH TH width=10%bean:message key=partnum.ecnsearchresults.releasedate//TH TH width=10%bean:message key=partnum.ecnsearchresults.status//TH /TR logic:iterate id=row name=results scope=request type=com.sony.sde.sql.Row pg:item TR TDbean:write name=row property=string[1]//TD TDbean:write name=row property=string[2]//TD TDbean:write name=row property=string[3]//TD TDbean:write name=row property=string[4]//TD /TR /pg:item /logic:iterate /TABLE TABLE width=60% border=0 TRTDnbsp;/TD/TR TR align=center TD pg:index pg:preva href=%=pageUrl%[ Prev]/a /pg:prev pg:pages bean:define id=pageNo value=%=pagerPageNumber.toString()%/ logic:equal name=pageNo value=%=pageNumber.toString()% %=pageNumber% /logic:equal logic:notEqual name=pageNo value=%=pageNumber.toString()% a href=%= pageUrl %%= pageNumber %/a /logic:notEqual /pg:pages pg:nexta href=%= pageUrl %[Next ]/a /pg:next /pg:index /TD /TR /TABLE /TD /TR /TABLE /pg:pager -Original Message- From: John Menke [mailto:[EMAIL PROTECTED]] Sent: 03 March 2002 02:08 To: struts-user Subject: paging taglib and struts? Does anyone any suggestions for implementing paging with struts? I have searched the archive and karl basel posted this: snip There's a good pager taglib at jsptags.com. I've used it in a struts app and does the job quite well when embedded in the iterate tags. logic:iterate pg:item Item Details /pg:item /logic:iterate snip I have downloaded this pager and the documentation is not providing enough information on how this works. Are there any examples out there on how to do this that I am missing? -john -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] * The information contained in this message or any of its attachments may be privileged and confidential and intended for the exclusive use of the addressee. If you are not the addressee any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: mapping.getInput() and request scope beans
Karen, Yes, you can specify an action mapping for the input parameter, so this is also a solution. HTH Malc -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 04 December 2001 11:50 To: struts users mailing list Subject: Re: mapping.getInput() and request scope beans Hello Karen, (sorry, used th wron address) I have had a similar problem using the html:selection tag which is at first used with session beans but I wanted to build request scope objects (I do not like to let hang aroung junks of session beans...). So what I have done is to do a request.setAttribute(bean,bean) and have a hidden field in the form to get the bean. I works quite well up to now. Hope, this helped Thomas -Original Message- From : Prengaman.Karen [EMAIL PROTECTED] To : '[EMAIL PROTECTED]' [EMAIL PROTECTED] Date : 04 December 2001 00:49:13 Subject : mapping.getInput() and request scope beans Hello, I have a jsp that displays data and has a very simple one-button form with one hidden field. When this form is submitted, ExitAction is called. In ExitAction's perform method, if a certain condition occurs, I want to return to the calling page. I do this with the following code: return new ActionForward(mapping.getInput()); My problem is that my jsp references a request-scope bean, and when returning to it, the bean is out of scope. If I put the bean in the session the problem does not occur (i.e., the jsp can access it), but I would rather leave the bean in the request. Any thoughts on how I can get around this? Do I have to specify a jsp file in the input parameter in struts-config, or can I specify an action? Thanks, Karen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] :-) As sceptical as one can be! (-: -- Get a free, personalised email address at http://another.com TXT ALRT! Stop wasting money now. Send FREE, personalised txt from http://another.com * The information contained in this message or any of its attachments may be privileged and confidential and intended for the exclusive use of the addressee. If you are not the addressee any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: HOW TO: set up a pager with struts
You could also try the JSPTags.com Pager Tag Library at http://JSPTags.com/tags/navigation/pager/ I am using this with Struts Iterator tags. HTH Malc -Original Message- From: Brian Cochran [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 00:47 To: Struts Users Mailing List Subject: RE: HOW TO: set up a pager with struts Whereas this may be a little cross posted, I just submitted a proposal to struts-dev on possibly developing a suite of PageIterators that have support for various functionality including: cacheing, JDBC 2.0 RecordSets, the Petstore way of requerying every time and support for extending to different methods. Let me know if you are interested on working on this. Brian -Original Message- From: Long Nguyen [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 15, 2001 7:09 PM To: 'Struts Users Mailing List' Subject: RE: HOW TO: set up a pager with struts Hi Oleg, If it is not too much trouble, can you send me an example? Thanks. Long B. Nguyen -Original Message- From: Oleg V Alexeev [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 2:23 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: HOW TO: set up a pager with struts Hello storck, I can suggest you my way. On base of query parameters, offset and page length values generate container or array of objects from database and store total value of records. Container or array you can display with iterate tag. For purposes of page links generation I can suggest bean and tag for you - I can send it for you. Wednesday, November 14, 2001, 1:09:06 PM, you wrote: s Hi, s I am developing a webapp with struts and EJB's. In some cases I only have to s display a list of Items. The problem is, that I cant show the whole list ... s sure to big ... s For retrieving the list I will either use the Fast-Lane Reader Pattern and s the Page-by-Page Iterator Pattern. In the Pet Store Demo they s implemented the Page-by-Page Iterator as a applicationspecific Tag, but I s think it should also be possible to implement it with struts (I am right). s Now I NEED your HELP. How must I set it up correct? s Any suggestions and comments are welcome !!! s -- s To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] s For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Best regards, Olegmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] * The information contained in this message or any of its attachments may be privileged and confidential and intended for the exclusive use of the addressee. If you are not the addressee any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
iterating over a Vector
Can anyone help me with this please? I have an Action class which populates a java.util.Vector. Each element of the Vector (v) will contain a 'Row' object. This 'Row' object itself contains an array of 'Column' objects. Each 'Column' object holds the name and value from a database column. Once the Vector has been populated, I store it in request scope: request.setAttribute(projectList, v); Is it possible to use this Vector directly in a logic:iterate on a JSP? If so, how? My ultimate aim is to iterate over each element of the Vector, and within each element iterate over the array of 'Columns' to display the values. Thanks Malcolm Wise Technology Manager Semiconductor Devices Europe Tel. +44(0)1256 388864 http://www.semiconductor.sony-europe.com
RE: problem in including file in INCLUDE TAG in jsp
Title: AW: SilverStream behind firewall Anwar, I don't think you can use expressions in an include directive. Try jsp:include page="%= sUrl %" flush="true" / Malc -Original Message-From: Anwar Sadat [mailto:[EMAIL PROTECTED]]Sent: 22 August 2001 11:21To: '[EMAIL PROTECTED]'Subject: problem in including file in INCLUDE TAG in jsp Hi all, I have a problem in including a html file in the JSP file. I have a 2 jsp's. The first jsp has a submit button. When i click on this submit button, I pass the filename as hidden type. I get this hidden variable in my next jsp. I will am trying to include this hidden variable in my include tag. here is the code snippet. first JSP. form name=editPreferences method="post" action="http://serverb/two.jsp"input type="submit" value="Edit Preferences"input type="hidden" name="url" value="/abc.htm" /form My second JSP % String sUrl = request.getParameter("url"); % %@ include file="%=sUrl%" % Is this correct.. I am having problems in compiling the second JSP.. Kindly help me regarding this. Quick response is appreciated. Thanx in advance. Regards Anwar K
STRUTS with Sybase EAServer 3.6.1 C2
Has anybody out there managed to get struts working with EAServer? I've got struts-example working to a point, but I'm stuck with StringIndexOutOfBounds exceptions in some of the HTML tag library classes and jsessionid problems. TIA Malcolm Wise Technology Manager Semiconductor Devices Europe Tel. +44(0)1256 388864 http://www.semiconductor.sony-europe.com
RE: STRUTS with Sybase EAServer 3.6.1 C2
FYI I've contacted Sybase Tech Support and the STRUTS related fixes will be in the C3 release, currently due out end September. Michael, are you currently doing any STRUTS development with EAServer? We would like to start work on a new project but we can't really wait for the fixes from Sybase. I would appreciate any pointers as to which parts of the framework we could start using now and also things to avoid until C3. Thanks Malcolm -Original Message- From: Michael Mok [mailto:[EMAIL PROTECTED]] Sent: 13 August 2001 13:09 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: STRUTS with Sybase EAServer 3.6.1 C2 Malcolm This is a current issue with EA Server 3.6.1 C2. From the sybase newsgroups, the Sybase engineers are looking into it. Regards Michael Mok www.teatimej.com - Original Message - From: Malcolm Wise [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 13, 2001 6:54 PM Subject: STRUTS with Sybase EAServer 3.6.1 C2 Has anybody out there managed to get struts working with EAServer? I've got struts-example working to a point, but I'm stuck with StringIndexOutOfBounds exceptions in some of the HTML tag library classes and jsessionid problems. TIA Malcolm Wise Technology Manager Semiconductor Devices Europe Tel. +44(0)1256 388864 http://www.semiconductor.sony-europe.com