Skip to content

Commit

Permalink
fixed websocket reverse absolute lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
branaway committed Mar 13, 2016
1 parent 227e343 commit 30e69a5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
Binary file modified dist-lib/japidplay-0.9.6.jar
Binary file not shown.
Binary file modified lib/japidplay-0.9.6.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Bing Ran<[email protected]>

Latest version: 0.9.5.2
Latest version: 0.9.6

* Links:

Expand Down Expand Up @@ -50,6 +50,8 @@ repositories:

* Version History:

2016/3/11: V0.9.6:
1. bug: absolute reverse lookup for websocket (WS) protocol failed.
2016/3/11: V0.9.6:
1. bug: get methods reverse lookup not working for AutoPath generated routes.
2. change: some JDK8 usage in AutoPath. Compiled with JDK8
Expand Down
17 changes: 3 additions & 14 deletions src.japidplay/cn/bran/play/RouteAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,17 @@ public RouteAdapter() {
*/
@Override
public String lookup(String actionString, Object[] params) {

String actionStringForLocalLookup = actionString;
if (actionString.indexOf(".") > 0) {
} else {
Request req = Request.current();
if (req != null) {
actionStringForLocalLookup = req.controller + "." + actionString;
}
}
ActionDefinition ad = lookupActionDefinition(actionString, params);
return ad.toString();
return new ActionBridge(false).invokeMethod(actionString, params).toString();
}

public ActionDefinition lookupActionDefinition(String actionString,
Object[] params) {
ActionDefinition ad = new ActionBridge(false).invokeMethod(actionString, params);
return ad;
return new ActionBridge(false).invokeMethod(actionString, params);
}

@Override
public String lookupAbs(String action, Object[] args) {
return getBaseUrl() + this.lookup(action, args);
return new ActionBridge(true).invokeMethod(action, args).toString();
}

// Gets baseUrl from current request or application.baseUrl in application.conf
Expand Down

0 comments on commit 30e69a5

Please sign in to comment.