Skip to content

Commit

Permalink
new way of making ajax posts
Browse files Browse the repository at this point in the history
  • Loading branch information
szimano committed Jun 28, 2012
1 parent 4fa6219 commit f61d8f2
Show file tree
Hide file tree
Showing 12 changed files with 3,403 additions and 2,051 deletions.
901 changes: 571 additions & 330 deletions asamal-example/src/main/webapp/static/css/bootstrap-responsive.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

3,289 changes: 2,442 additions & 847 deletions asamal-example/src/main/webapp/static/css/bootstrap.css

Large diffs are not rendered by default.

619 changes: 9 additions & 610 deletions asamal-example/src/main/webapp/static/css/bootstrap.min.css

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
612 changes: 357 additions & 255 deletions asamal-example/src/main/webapp/static/js/bootstrap.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion asamal-example/src/main/webapp/static/js/bootstrap.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion asamal-example/src/main/webapp/view/home/index.vm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<script type="text/javascript">
function reloadTweets() {
$a.reRender('home', 'reload', '""', '"tweetList"');
ajaxPost('home', 'reload', '', 'tweetList');
}

$(document).ready(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
@MouthSoap @Interceptor
public class MouthSoupInterceptor {

private final static List<String> BAD_WORDS = Arrays.asList("motyla noga", "kurka wodna", ".net");
private final static List<String> BAD_WORDS = Arrays.asList("motyla noga",
"kurka wodna", ".net");

private final static String CENSOR = "$%&#!!";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public class HTTPParams {

@GET
@Path("/query/{id}")
public String parametrized(@PathParam("id") String id, @QueryParam("key") String value) {
public String parametrized(@PathParam("id") String id,
@QueryParam("key") String value) {
return "Got a paremeter: " + id + " with key = " + value;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ public String parametrized(@PathParam("id") long id) {

@POST
@Path("/two/params/{category}/{id}")
public String twoParams(@PathParam("category") String category, @PathParam("id") String id) {
public String twoParams(@PathParam("category") String category,
@PathParam("id") String id) {
return String.format("Got two parameters: %s and %s\n", category, id);
}

@GET
@Path("/wild/{id}{sep:/?}{path:.*}")
public String wildcardParams(@PathParam("id") String id, @PathParam("path") String optionalPath) {
public String wildcardParams(@PathParam("id") String id,
@PathParam("path") String optionalPath) {
return String.format("Got id: %s\nWith optional params: %s", id, optionalPath);
}

Expand Down

0 comments on commit f61d8f2

Please sign in to comment.