Handling parameter, and passing it to fmt
authorMartin Rexa <martin.rexa@centrum.cz>
Wed, 13 Jan 2010 14:36:17 +0100
changeset 2129dc1915485ba
parent 211 f861f40cabc3
child 213 cd2ffe8bb540
Handling parameter, and passing it to fmt
freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/UI.java
     1.1 --- a/freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/UI.java	Wed Jan 13 14:35:28 2010 +0100
     1.2 +++ b/freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/UI.java	Wed Jan 13 14:36:17 2010 +0100
     1.3 @@ -376,13 +376,13 @@
     1.4      @Path("elo")
     1.5      @Produces(MediaType.TEXT_HTML)
     1.6      public Response getEloList(
     1.7 -            @QueryParam("historyId") @DefaultValue("0") String historyId){
     1.8 +            @QueryParam("historyId") @DefaultValue("0") Integer historyId){
     1.9          Viewable v = checkLogin();
    1.10          if (v != null) {
    1.11              return Response.status(Response.Status.FORBIDDEN).entity(v).build();
    1.12          }
    1.13 -        final Document got = stat.path("elo").path("list").path(historyId).accept(MediaType.TEXT_XML).get(Document.class);
    1.14 -        return Response.ok(viewable("elo.fmt", got)).build();
    1.15 +        final Document got = stat.path("elo").path("list").path(historyId.toString()).accept(MediaType.TEXT_XML).get(Document.class);
    1.16 +        return Response.ok(viewable("elo.fmt", got, "historyId", historyId)).build();
    1.17      }
    1.18      
    1.19      @GET