data-icon for option within t:select

"D. R." <[email protected]> Thu, 15 Nov 2018 06:30:27 +0100
Newsgroups gmane.comp.java.tapestry.user
Message-ID <[email protected]>
Hi,

how can i get control of the option elements within a t:select?

I want to provide a unique data-icon property for each option.

<t:select t:id="iconCode" 
t:model="literal:fa-globe=Globe,fa-flask=Flask,fa-user-tie=User-tie">
</t:select>

will render:

<select class="form-control" id="iconCode" name="iconCode">
  <option value=""></option>
  <option value="fa-globe">Globe</option>
  <option value="fa-flask">Flask</option>
  <option value="fa-user-tie">User-tie</option>
</select>

i need something like

<select class="selectpicker" id="iconCode">
   <option data-icon="fa-globe">
       Globe
   </option>
   <option data-icon="fa-flask">
       Flask
   </option>
   <option data-icon="fa-user-tie">
       User-tie
   </option>
</select>

i want to add class="selectpicker" to the t:select in order to let 
bootstrap convert the select to a dropdown with icons.

Kind regards
David


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]