Here's the situation before I inherited the project: There was an applet with a browse button. There was also another button that was not part of the applet. Clicking on the button launched a process with the selected path as a parameter.
Here's the situation now: I added a set of radio buttons to the applet. Selecting a radio button populates a variable with the selection. However, I have discovered that clicking on the button now launches another instance of the applet, so that the radio selection is not preserved.
What is the best and shortest way to preserve the value of the original selection?
If you want values to persist when the page refreshes then you need to keep a record of the values whenever they are changed and read in these recorded values when the new applet instance loads. You may want to keep record the current date and time as well so you don't load out of date values eg from a session several hours/days ago.
I've never done this before but I think you could do it with cookies. There's a threadhere that may get you started.