<%@ page language="java" errorPage="error.jsp" contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/personalization.tld" prefix="op" %>

<html>
<head><title>Personalization Demo</title></head>
<body>
<h2>SelectHotPicks Demo</h2>
<% String groups = request.getParameter("groups");
   if( groups != null ) {
%>
<op:selectFromHotPicks hotPicksGroups="<%=groups%>" storeResultsIn="results"/>
<table border=1>
<tr><td><b>&nbsp;Type&nbsp;</b></td><td><b>&nbsp;ID&nbsp;</b></td></tr>
<%
      for(int i=0; i<results.length; i++) {
%>
<tr><td>&nbsp;<%=results[i].getType()%></td><td>&nbsp;<%=results[i].getID()%></td></tr>
<%
      }
%>
</table>
<hr>
<% } %>
<form action="selectfromhotpicks.jsp" method="post">
Hotpick Groups: <input type="text" name="groups"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
