Implementing Tooltip for a Struts select box

Hi - I have several items displayed in a struts select box - for each I would like to implement a tooltip for the user - is there any way to do this ?

Thanks
abuyusuf35Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JavaGuy78Commented:
If I needed to do this, I would:

1. create a bean that would be used top fill the select list. The bean would have objects for the Label, value and tooltip for each item in the select.
2. Generate the list of options for the select and put them into an ArrayList<SelectListBean>
3. Then in the JSP, I would iterate through the ArrayList, adding a tooltip for each item in the select.

NOTE: the html tag property for what you would call tooltip is "Title" and you can see the usage of the Title property in the code example below.
<select name="parts" size="5" multiple="true">
    <logic:iterate id="sel" type="com.themaskedcrusader.project.beans.admin.SelectListBean" name="selList" scope="request" indexId="count">
        <option value="<bean:write name="sel" property="value"/>" title="<bean:write name="sel" property="toolTip"/>">
            <bean:write name="sel" property="label"/>
        </option>
    </logic:iterate>
</select>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.