Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Clean Up Multipe Selections on Display After the Form is Submitted?  RSS feed

 
Daniel Gee
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I observed a problem:

After a user submits his/her multiple selections from a list box, which is an action taken place, I display the selections to make sure that things work fine. Then, I close the browser.

While the server is still running, I re-run the same application. And I see the previously selected items are highlighted in the list box on my screen.

What should I do to resolve this problem? I mean
how to erase the selections visually after the form is submitted? This is my command button:
 
Daniel Gee
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me answer my own question.

In the displaySelectedFiles() method that is invoked by an action, I nllify the Object[] that contains the multiple selections. This way, the multiple selections that were made previously will not show up
(i.e. not be highlighted) on the screen when I re-run the application.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!