//Auto-generated by RSP Compiler
//Source: fortunesView.rsp.html
part of stream_benchmark;

/** Template, fortunesView, for rendering the view. */
Future fortunesView(HttpConnect connect, {List fortunes}) { //#2
  var _t0_, _cs_ = new List<HttpConnect>();
  HttpRequest request = connect.request;
  HttpResponse response = connect.response;
//  Rsp.init(connect, "text/html; charset=utf-8");

  response.write("""<!DOCTYPE html>
<html>
  <head>
    <title>Fortunes</title>
  </head>
  <body>
    <table>
      <tr>
        <th>id</th>
        <th>message</th>
      </tr>
"""); //#2

  for (var fortune in fortunes) { //for#13

    response.write("""      <tr>
        <td>"""); //#14

    response.write(Rsp.nnx(fortune.id)); //#15


    response.write("""</td>
        <td>"""); //#15

    response.write(Rsp.nnx(fortune.message)); //#16


    response.write("""</td>
      </tr>
"""); //#16
  } //for

  response.write("""    </table>
  </body>
</html>
"""); //#19

  return Rsp.nnf();
}
