• LogFromAgent

    By Paul S Withers 1 decade ago

    I found that session.getURL() was returning nothing, so LogFromAgent was blank. context.getUrl() works nicely except in beforePageLoad, where it throws an error. For that you can use the facesContext object, although bear in mind it returns the XPage regardless of the actual URL in the address bar. So you can use the code below.

     

    if (@Text(context.getUrl())!="") {

    location=@RightBack(@Text(context.getUrl()),"/");

    } else {

    location=@RightBack(facesContext.getExternalContext().getRequest().getRequestURI(),"/")+"?"+facesContext.getExternalContext().getRequest().getQueryString();

    }

     
    Also, e.getMessage() throws an error in 8.5.2 CD5 (although this is just beta code and may or may not be the same when it reaches Gold release). e.message works fine in 8.5.1 and 8.5.2 CD5