set the name of the action in the request object
when executing an action.
This commit is contained in:
parent
2574442456
commit
93eb5c9750
1 changed files with 9 additions and 5 deletions
|
@ -284,10 +284,10 @@ public class RequestEvaluator implements Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action == null) {
|
if (action == null) {
|
||||||
|
|
||||||
if (pathItems[i].length () == 0)
|
if (pathItems[i].length () == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
currentElement = app.getChildElement (currentElement, pathItems[i]);
|
currentElement = app.getChildElement (currentElement, pathItems[i]);
|
||||||
|
|
||||||
// add object to request path if suitable
|
// add object to request path if suitable
|
||||||
|
@ -319,7 +319,7 @@ public class RequestEvaluator implements Runnable {
|
||||||
if (action == null)
|
if (action == null)
|
||||||
throw new FrameworkException ("Action not found");
|
throw new FrameworkException ("Action not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (FrameworkException notfound) {
|
} catch (FrameworkException notfound) {
|
||||||
if (error != null)
|
if (error != null)
|
||||||
// we already have an error and the error template wasn't found,
|
// we already have an error and the error template wasn't found,
|
||||||
|
@ -340,8 +340,12 @@ public class RequestEvaluator implements Runnable {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
localrtx.timer.beginEvent (requestPath+" execute");
|
localrtx.timer.beginEvent (requestPath+" execute");
|
||||||
|
|
||||||
|
// set the req.action property
|
||||||
|
req.action = action.getName ();
|
||||||
|
// do the actual action invocation
|
||||||
current.doIndirectCall (evaluator, current, action.getFunctionName (), new ESValue[0]);
|
current.doIndirectCall (evaluator, current, action.getFunctionName (), new ESValue[0]);
|
||||||
|
|
||||||
// check if the script set the name of a skin to render in res.skin
|
// check if the script set the name of a skin to render in res.skin
|
||||||
if (res.skin != null) {
|
if (res.skin != null) {
|
||||||
int dot = res.skin.indexOf (".");
|
int dot = res.skin.indexOf (".");
|
||||||
|
@ -362,7 +366,7 @@ public class RequestEvaluator implements Runnable {
|
||||||
else
|
else
|
||||||
throw new RuntimeException ("Skin "+res.skin+" not found in path.");
|
throw new RuntimeException ("Skin "+res.skin+" not found in path.");
|
||||||
}
|
}
|
||||||
|
|
||||||
localrtx.timer.endEvent (requestPath+" execute");
|
localrtx.timer.endEvent (requestPath+" execute");
|
||||||
} catch (RedirectException redirect) {
|
} catch (RedirectException redirect) {
|
||||||
// res.redirect = redirect.getMessage ();
|
// res.redirect = redirect.getMessage ();
|
||||||
|
|
Loading…
Add table
Reference in a new issue