In an xpage I can get the name of the xpage by using
var path:string = facesContext.getExternalContext().getRequest().getRequestURI()
return session.evaluate("@RightBack(\"" + path + "\"; \"/\")").get(0)
(that really is using the path to get the url).
I would like to get the name of the custom control but I think that this is not possible?