Forums Register Login

Getting the selected option text

+Pie Number of slices to send: Send
Hi,

I have a dropdown (combo box) in the .jsp page of my Liferay portlet, in my Java code I can get the selected value using request.getParameter("DROPDOWN_NAME"); in processAction method.
My question is: how can I get the selected text (the one between the option tags) in the Java code?

Thanks for any help!
1
+Pie Number of slices to send: Send
You can't. That information is not submitted as part of the request.

If you really need it, you can use JavaScript to copy the value into a hidden input that can be submitted.
+Pie Number of slices to send: Send
 

Bear Bibeault wrote:You can't. That information is not submitted as part of the request.

If you really need it, you can use JavaScript to copy the value into a hidden input that can be submitted.



Thank you for your answer, Bear!
What a stench! Central nervous system shutting down. Save yourself tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3913 times.
Similar Threads
How to get values from a dropdownlist
populate dropdown menu from java method
Struts2 <s:select multiple=true> -> Eventbean.setMap(Map map_from_multile_struts2)
combo box
How Drop Down Box values can be retained
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:32:36.