views:

1179

answers:

2

Hi, In a regular select box you can show the full title on mouseover using "title" attribute in the "option" field.

In Apache Struts, you make the select box with the "html:options" tag. I don't think this tag supports the "title" attribute. Is there another way to show the full title of an option on mouseover for the "html:options" struts tag?

Thanks

A: 

I'll admit to not being familiar with Apache Struts. If nobody more familiar can find you a better solution then worst case you could do it as a javascript tooltip. It's more effort, but gives you more effective visual control over the presentation.

Gabriel Hurley
onmouseover and onmouseout are invalid tags as well. good times :DIs there a diff way to do a js tooltip without using those tags?
Oh joy. You could give the element a unique id and target that to add the necessary event handlers. A framework like jQuery, Prototype or Mootools would make that easier, though you *can* do it by hand.
Gabriel Hurley
A: 

Struts' tag for <select><option>.. is <s:select />, or <s:doubleselect /> for double lists. <s:doubleselect /> doesn't support title at all, you have to modify the Javascript it generates by hand (ddoubleselect.ftl). For with the default theme, the file is found in struts2-core-2.1.6.jar under template/simple/.

kozmic