0

The doc says:

"itemDescription: evaluates to a String that will serve as the description to be shown for the item."

http://docs.oracle.com/javaee/6/javaserverfaces/2.1/docs/vdldocs/facelets/f/selectItems.html http://docs.oracle.com/javaee/6/javaserverfaces/2.1/docs/vdldocs/facelets/f/selectItem.html

I'm not getting any title attribute added to the resulting option element in the DOM or anything, not even when setting a literal String as its value (neither on f:selectItem nor f:selectItems, each tried seperately, the latter with a c:forEach over the list items which showed up correctly with their labels).

Some forum posts seemed to suggest people use it for tooltips.

The doc isn't being entirely clear, is the itemDescription attribute on the component even meant to be rendered as a tooltip/title? And if not, what's it good for?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
user3280015
  • 279
  • 2
  • 10

1 Answers1

0

I think BalusC already answered it in https://stackoverflow.com/a/25512124/3280015, which I initially overlooked.

"While creating the custom renderer, you could make use of the unused(!) description property of the UISelectItem class."

So it is currently simply unused and left for potential use by developers. Maybe that's what the Doc means by:

"for use in development tools."

Community
  • 1
  • 1
user3280015
  • 279
  • 2
  • 10