troubleshooting Question

<form:select> binding

Avatar of elkhawajah
elkhawajahFlag for Jordan asked on
JavaJSPJava EE
28 Comments1 Solution1324 ViewsLast Modified:
Hi experts ..

Is it possible to use multiple paths with spring mvc <form:select> tag? I mean in the code below, is set to the selected value (itemValue), but I also want to set property to the selected label (itemLabel).

Is that possible?
class Drug {
     Long id;
     String name;
    // .. getters and setters 
<form:select id="drug-name" 
	<form:option value="0" label="select drug name" />
	<form:options items="${drugs}" itemLabel="description" itemValue="id"/>
Mick Barry
Java Developer
Join our community to see this answer!
Unlock 1 Answer and 28 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 28 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros