简体   繁体   中英

struts 1.3 tiles with Display Tag

Let me explain the problem in very simple manner, In my app, I've a JSP which contains 2 tiles.

  1. Tile 1 is a jsp containing Search Form. Suppose it has only one search parameter that is set into ActionForm on submit action.
  2. Tile 2 is containing the DisplayTag showing all results which were stored in session attribute (After we press submit form of Tile 1).

Now 1st page of display Table is working fine. But when I click on another page links (ie 2,3,Last) it loads the blank page. Problem is, Search param is not accessible from here so it can not be appended behind the requestURI. (Definitely, I return the zero records when no conditions appended on sql query.)

So question is, how can I access the property of another JSP (My search form - another tile) ?

My proposed solutions (but I am not satisfied):

  • I can put my Display Tag code into the same Tile of search form. Works fine. But I want separation.
  • I can use hidden params into Tile 2. But it may result in duplicate params same as Tile 1.

Please let me know about some efficient solution as I am new with Struts Tiles concept.

Display tags works with form scope session.

Put the form that you are using to display the data in table in session scope.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM