Everything works fine, except when I leave the window and click on the link again. When I do that, it goes to the correct page but completely skips the action class, so any data that might have been changed is not displayed--the user is seeing an old copy of the page. To clarify, here are the steps taken: 1: click on link--new window opens with list of items displayed on page 2: go through process in new window to add an item to the db, but do not click the button to go back and re-display the list. 3: leaving window open, go to main application window and click on the link again--focus is changed to the child window, the correct action mapping is called (so the correct page is displayed), but the action class is never hit. The list of items does not contain the new item I just added. How is this possible? The only explanation I can come up with is that it is caching the page, but I added
to my jsp template, and it doesn't make any difference. The only solution I have come up with is to essentially call it twice:
This makes it so it will always go through the action class at least once, but unfortunately, also means that it often goes through it twice (i.e. when first clicking on the link), which is a performance problem. I can't seem to find anything on Google that addresses this. Does anyone have a clue as to what the problem is and how I can fix it?
My suggestion would be to add logic to your function to see if a child window is already open, and if it is, refresh the window rather than calling window.open().