Details
Description
Example:
<html>
<style>
option.information, select.information {
background-position:left middle;
background-repeat:no-repeat;
padding-left:17px;
background-image: url(./information.gif);
color: yellow;
vertical-align:middle;
}
option.hinweis, select.hinweis {
background-position:left middle;
background-repeat:no-repeat;
padding-left:17px;
background-image: url(./hinweis.gif);
color:blue;
vertical-align:middle;
}
</style>
<body>
<select size="1" class="hinweis">
<option class="information" id="eintrag1">Eintrag 1
<option class="hinweis" id="eintrag2" >Eintrag 2
<option class="hinweis" id="eintrag3" >Eintrag 3
<option class="information" id="eintrag4" >Eintrag 4
<option class="information" id="eintrag5" >Eintrag 5
</select>
</body>
</html>
The API from SelectItem must then support markup:
public SelectItem(Object value,
String label,
String description,
String image,
String markup)
if "image" is set, then <option > can be rendered as
<option class="hinweis" style="background-image=url('<image>')">Eintrag 3
restrictions:
- MS IE does not rendert the pictures - however the different colors.
Attachments
Issue Links
- duplicates
-
TOBAGO-403 Markup attribute for tc:selectItem would be nice
-
- Closed
-