This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JSP and the fly likes problem with form reset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem with form reset" Watch "problem with form reset" New topic
Author

problem with form reset

Naveen Mishra
Ranch Hand

Joined: Nov 20, 2005
Posts: 75
Hi.

I've written a TLD for rendering dropdown in jsp page .
The tag takes Map with key / value in it for rendering the list.
optionally we can pass key / value to display as selected item.
here is the sample jsp code snipet :


the first one renders dropdown with some data selected and the other without selection.

The problem is, when I reset my form , the dropdown is with no selection , regardless of it contained some data initially or not.
I wanted to retain the data in case it was there .

here is the code for tld ..


what could be the possible reason ?
some help pls.

Thanks.
[ October 11, 2006: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60045
    
  65

A form reset occurs on the client, so showing us the server-side code is not helpful. What HTML for the select element is being sent to the browser?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with form reset
 
Similar Threads
Dynamic selection in Combobox
JSP Custom Tag Lib
Drop down population problems .....
Generating chained dynamic dropdowns using JSP/Servlet and AJAX
select comes to default again