Ignore:
Timestamp:
Dec 5, 2012, 2:36:43 PM (11 years ago)
Author:
casties
Branch:
default
Message:

deal with special characters in urls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/PersonsResource.java

    r50 r65  
    5757        String form = f.getFirstValue("form");
    5858        if (form != null && form.equals("new_person")) {
    59             // output new group form
     59            // output new person form
    6060            result = "<html><body>\n";
    6161            result += "<h1>New person</h1>\n";
     
    6969            result += "</form>\n</body>\n</html>";
    7070        } else {
    71             // list all groups
     71            // list all persons
    7272            result = "<html><body>\n<h1>Persons</h1>\n<table>";
    7373            result += "<tr><th>id</th><th>name</th><th>uri</th></tr>";
     
    7575            for (Person person : persons) {
    7676                Reference url = this.getReference().clone();
    77                 url.addSegment(person.getId());
     77                url.addSegment(person.getIdString());
    7878                result += String.format("<tr><td><a href=\"%s\">%s</a></td><td>%s</td><td>%s</td></tr>\n", url,
    7979                        person.getIdString(), person.getName(), person.getUri());
     
    8787
    8888    /**
    89      * POST creates a new Group.
     89     * POST creates a new person.
    9090     *
    9191     * @return
Note: See TracChangeset for help on using the changeset viewer.