Skip to content

Instantly share code, notes, and snippets.

@roamingthings
Created December 10, 2013 08:32
Show Gist options
  • Save roamingthings/7887383 to your computer and use it in GitHub Desktop.
Save roamingthings/7887383 to your computer and use it in GitHub Desktop.
Vertical list of radio buttons with bootstrap design using JBoss Seam 2 and JSTL
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:t="http://myfaces.apache.org/tomahawk"
contentType="text/html">
<t:selectOneRadio id="mySelect" value="#{target.value}" layout="spread" required="true">
<s:selectItems
value="#{dataSource.itemList}"
var="_item"
itemValue="#{_item.ID}"
label=""/>
</t:selectOneRadio>
<c:forEach items="#{dataSource.itemList}" var="_item" varStatus="_loop">
<div class="radio">
<label>
<t:radio for="mySelect" index="#{_loop.index}" />&#160;#{_item.description}
</label>
</div>
</c:forEach>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment