Skip to content

Instantly share code, notes, and snippets.

@wfaler
Created February 23, 2011 21:47
Show Gist options
  • Select an option

  • Save wfaler/841261 to your computer and use it in GitHub Desktop.

Select an option

Save wfaler/841261 to your computer and use it in GitHub Desktop.
cars.ssp
<%@ val makes: List[org.bowlerframework.examples.jpa.Make] %>
<%@ val make: org.bowlerframework.examples.jpa.Make %>
<select name="car.make">
<%
makes.foreach(m => {
%>
<option <% if(make.id == m.id){%>SELECTED<%}%> id="${m.id}">${m}</option>
<%
})
%>
</select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment