séan35
séan35

Reputation: 1052

How to implement an ordered list on JSF

This is the plain HTML text and used for jQuery UI theme (selectable) . However, I need to transform it to use in JSF. List items should be got back from a bean and generate an ordered-list. Is there a way to do this with JSF tags (for ex./ h:selectOneListbox)?

<ol class="planList" >
   <li class="ui-widget-content">plan1</li>
   <li class="ui-widget-content">plan2</li>
   <li class="ui-widget-content">plan3</li>
</ol>

All feedback appreciated!

Upvotes: 2

Views: 1524

Answers (1)

Avinash Singh
Avinash Singh

Reputation: 3787

You can use it in this way as there is no standard JSF component for this , probably because it can be done simply using ui:repeat

<ol class="planList">
<ui:repeat value="#{myManagedBean.plans}" var="plan">
<li class="ui-widget-content"><h:outputText value="#{plan.name}"/></li>
</ui:repeat>
</ol>

Upvotes: 3

Related Questions