"RK RK", you have previously been warned on multiple occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional, and this is your final warning. Adjust your display name to comply with the required standards prior to your next post.
Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Failure to comply will result in the removal of your account.
Please make sure you put a little more description for the question. Make the guesswork less for the people who read the questions.
Please provide more information about the scenario, to increase your chances of getting it resolved.
Joined: Oct 21, 2008
I have a table with links in it on page1. when i click on a link in a row it leads me to a new page2. I have a return button there, onclicking it leads to the parent page1. I need to highlight the respective row in the table after clicking return button. How do i do this. I think i need to capture the url history using http, but i am not sure how to do it...please help
As sushant pointed out, you are really light on the details of your situation. In really general terms, I would presume that you have some sort of id which identifies the record you are selecting on page1 and displaying on page2. I would add a parameter to the URL on the return button to indicate which record to highlight. You will have to change however you are displaying records on page1 to check for a highlight parameter and, if it exists, highlight that one row by means of a CSS class or inline style declaration. If you take a look at the iterator tag documentation, you will see an example which highlights odd numbered rows. Perhaps that will point you in the right direction.
--------------- 1.in table.jsp i have the table being displayed with rows having links in them(paged display of the rows) 2.wen klik on the link it leads to Return.jsp 3.now wen i klik the return button in Return.jsp it has to lead me to Table.jsp and it has to find the correct page where the record is and highlight the correct row.
I don't really understand what issue you're having. You asked how to highlight a row, I said look at the DisplayTag docs or ask on a DisplayTag list. You asked how to generate a URL with variables in it, I showed you--just substitute whatever variables you need.
Your method may also work--you'd have to look at the generated HTML to see if it is working or not. Is it?
As the <s:a...> docs state it's really designed for use with the Ajax theme, although I suppose it could work.
Joined: Oct 21, 2008
i dont still know how well to explain to you.
ok let me give another try...
i have a jsp called table.jsp, that displays a table with more than 500 rows in it in a paged manner(pagelinks) so there are more than 10 pages.
the second cell of each row has links in it. When i klik on the link it leads me to another page2 that is handled by the return.jsp.
In the return.jsp i have a return button that leads me just back to the tables page(table.jsp).
Now my issue here is that if i have kliked some row on the 10th page of the tables then how do i capture the row number that was kliked and that exact page number, so that i am returned back and highlight the correct row on the correct page.
You put the page number and row number into the URL, either how you're already doing it, or how I showed you.
Joined: Oct 21, 2008
still i am not able to solve this:
the issue is that: i need to capture the history as to which row and on which page number it was clicked, for this i need to cache the query string. my query string looks like this ?org.id=433&d-16544-p=4
where org.id is the org.id nnumber that i click on the row of the table and p=4 is the page number. How do i capture this and it should be remembered when i return and highlighted accordingly.
i hope the problem is well described in my previous posts..
In Struts 2 URL parameters are mapped to action properties. If you have action properties with publicly accessible setters the URL parameters will be type-converted and set on the action by the framework.
subject: Highlight corresponding row after Return button press