I put all the hospitaldata objects in to an arrayList and set it in the request object.
I want to display the hospitalname to the user. But when the user submits the form the hospitalid should be submitted.
Can anyone tell me how this is done. I feel logic:iterate can be used. But it gives problem when displaying Double values.Has anyone solved this problem.
Thanks for your help With Regards Adrian
posted 10 years ago
One way to do this would be to add a getFormattedHospitalId() and setFormattedHospitalId() method to your hospitaldata class. Have the getter method return a string which represents the the double value formatted using java.text.NumberFormat, and have the setter method convert the string to a double. You would then use the property formattedHospitalId in your jsp rather than hospitalId.