Added functionality for elo history
authorMartin Rexa <martin.rexa@centrum.cz>
Tue, 12 Jan 2010 15:57:44 +0100
changeset 19539a607f6f174
parent 194 d5b65f68f68a
child 196 7c4da0dc55a4
Added functionality for elo history
freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/UI.java
     1.1 --- a/freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/UI.java	Mon Jan 11 17:48:15 2010 +0100
     1.2 +++ b/freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/UI.java	Tue Jan 12 15:57:44 2010 +0100
     1.3 @@ -375,12 +375,13 @@
     1.4      @GET
     1.5      @Path("elo")
     1.6      @Produces(MediaType.TEXT_HTML)
     1.7 -    public Response getEloList(){
     1.8 +    public Response getEloList(
     1.9 +            @QueryParam("historyId") @DefaultValue("0") String historyId){
    1.10          Viewable v = checkLogin();
    1.11          if (v != null) {
    1.12              return Response.status(Response.Status.FORBIDDEN).entity(v).build();
    1.13          }
    1.14 -        final Document got = stat.path("elo").path("list").accept(MediaType.TEXT_XML).get(Document.class);
    1.15 +        final Document got = stat.path("elo").path("list").path(historyId).accept(MediaType.TEXT_XML).get(Document.class);
    1.16          return Response.ok(viewable("elo.fmt", got)).build();
    1.17      }
    1.18