aspose file tools*
The moose likes Servlets and the fly likes Selection List Change not updated Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Selection List Change not updated" Watch "Selection List Change not updated" New topic
Author

Selection List Change not updated

curtis harrison
Greenhorn

Joined: Sep 12, 2001
Posts: 8
I have a JSP page (page1) with a dynamic <select> list. When the user first gets to the page, nothing is selected. They select an item, click a button, and the correct item is sent to the next page (page2). However, from page 2, if the user presses the browser's back button, they go back to page 1, the same list is displayed with their previous selection highlighted. When they change the selection and click the 'next' button, they go to page 2, but the FIRST selection they had made is sent to page 2, not the most recent selection.
If they press the browser's back button and see the list with a selected item, and then press the browser's refresh button, the selection in the list is unselected. They can make a new selection, press the 'next' button, and the CORRECT item appears.
Is there a way for me to force a 'refresh' when a page 1 loads, or FORCE some kind of 'unselect' on the selection list when the page is revisited. I don't EVER want an item to be initally selected in the selection list.
Is there a command to 'unselect' all items in the list?
Thanks,
Curtis
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

It sounds like a browser caching problem.

There are a LOT of posts on here about this, do a search for all the META tag, and JSP solutions for this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Selection List Change not updated
 
Similar Threads
How to refresh my page?
Deselection of Items in a JList
JSP + struts html:select
JSP + struts html:select
Simple list table