- Components
- List Item
List Item
List Element used by ul and list components. Supports automatic link wrapping and conditional active state with configurable active class.
When you specify the link
attribute, the active state will be set on the item if the current
viewId
starts with the given link value. This is a neat trick that
makes it very easy to create menu links that activate automatically.
The example below shows the markup for rendering the component menu on this page.
list.xhtml
Documentation
<t:menubar orientation="vertical">
<t:li link="/docs/accordion/">Accordion</t:li>
<t:li link="/docs/tabview/">TabView</t:li>
<t:li link="/docs/button/">Button</t:li>
</t:menubar>
List Element used by ul and list components. Supports automatic link wrapping and conditional active state with configurable active class.
Info
Tag name | li |
---|---|
Component type | io.tornadofaces.component.Li |
Renderer type | io.tornadofaces.component.LiRenderer |
Attributes
Name | Description | Required |
---|---|---|
value | The value will be converted to the HTML of the li tag. You an optionally add children to the li instead, or in combination with this attribute. | false |
styleClass | Styles to apply to the list section. | false |
icon | Icon will be added as an i with the supplied icon value as a class attribute | false |
activeClass | Style class for active items. Defaults to "is-active". | false |
active | Active state. If true, activeClass will be added to the li. If link is set but no active attribute is given, active will return true if the viewId starts with the link attribute value. | false |
title | Title list elements display as a header for subsequent list items. | false |
link | Wrap the contents of this li in an anchor with href set to the this property value. | false |
chevron | If the li is inside a list, chevron=true will render a chevron to the right of the list entry, indicating that it is clickable and has a navigation target. Default false. | false |
rendered | Should this component be rendered? | false |
show | Show this component normally, or render an empty placeholder element. Defaults to true. | false |