@GET @Path ("gadget/{project}/{fieldId}/groups") @Produces (MediaType.TEXT_HTML) public Response getLabelGroups(@PathParam ("project") String project, @PathParam ("fieldId") String fieldId) { final Optional<Long> projectId = parseProjectId(project); if (!projectId.isPresent()) { return Response.status(Response.Status.BAD_REQUEST).entity("Error parsing project id from '" + escapeHtml(project) + "'").cacheControl(NO_CACHE).build(); } return Response.ok(alphabeticalLabelRenderer.getHtml(authenticationContext.getLoggedInUser(), projectId.get(), fieldId, true)).cacheControl(NO_CACHE).build(); }