In my presenter I have prepareFromRequest()
method where I want to know that from which place request has come to this method.
As revealPlace()
gets called from many places with my current name token, is there any way to find out from where exactly current method getting called?
As my issue is not reproducible when launched through eclipse and only reproducible through jetty, I can't put logger statements to all places.
Please suggest a way to find the caller of prepareFromRequest()
method?
If you need to know the current place in the app, you can use two options:
String currentPlace = History.getToken();
Place place = clientFactory.getPlaceController().getWhere();
However, in your case you may simply add an argument to your method:
public void doSomething(String fromWhere) {
if ("home".equals(fromWhere)) {
...
}
}
Then simply pass the parameter to this method when you call it.