Hi,
 
Try this:
 
1. Get the page no from where user selects a row for edit.
String page = request.getParameter(new
ParamEncoder("dataTable").encodeParameterName(TableTagParameters.PARAMET
ER_PAGE));

session.setAttribute("pageNo", page);

2. When user click cancel, I hope ur reading list and printing the page.
In the same method try setting the page parameter to the page what user
was looking earlier.

String pageKey = new
ParamEncoder("dataTable").encodeParameterName(TableTagParameters.PARAMET
ER_PAGE);

String page = (String)session.getAttribute("pageNo");

String url += "?"+pageKey+"="+page;

Now user will be redirected back to the  same page where he was earlier.

 

Regards,

JP

 

 

 


________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
srinivas kamisetty
Sent: Friday, August 24, 2007 11:55 AM
To: displaytag-user@lists.sourceforge.net
Subject: [displaytag-user] Returning user back to the same page
afterediting rows


Hello all,
 
I am working on a project using struts, spring and diplaytags besides
other things. I have to change some functionality in how we are using
displaytags.  Right now my application shows 10 pages with each page
showing 10 rows.  For example if the user is in 5th page and select one
row to edit and clicks next, he/she will be directed to next screen with
all the details related to selected rows.  But sometimes it is possible
that he may decide, not to edit and hit cancel button which will take
him back to the earlier screen showing 10 pages with 10 rows.  But the
problem is application takes him back to 1st page of 10 pages again
instead of taking him back to 5th page where he selected the row to
begin with.  
 
The requirement is that if the user is on 5th page and selects a row to
edit but once he gets all the details of that row in next page but
decides not to edit and hits cancel button he has to go back to 5th page
instead of 1st page again.  I am just wondering if anyone has done it
before or have any thoughts on it. Thanks in advance for sharing.
 
Regards,
Srini

________________________________

Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user
panel
<http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/yaho
o_panel_invite.asp?a=7>  and lay it on us. 
Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.
        
E-mails are not encrypted and cannot be guaranteed to be secure or 
error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses.  The sender 
therefore does not accept liability for any errors or omissions in the 
contents of this message which arise as a result of e-mail transmission.  
If verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities 
or related financial instruments.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to