Hi,
I’m trying something easy to learn the RequestDecorator.
I’m trying to simply force the end slash when using buildLink.
The code works correctly, but the URL generated is missing the base when using the decorator.
I did some debugging and :
Using the buildLink normaly, the SESBaseURL has a value and gives me the proper URL for my project.
When implementing the buildLink for the decorator, using the same parameters, the sesbaseURL is empty for the context.
Any idea what might be causing this ?
Using coldbox 6.5.2
My decorator :
component extends="coldbox.system.web.context.RequestContextDecorator"{
function configure(){
return this;
}
string function buildLink(
to,
queryString="",
boolean translate = true,
boolean ssl,
baseURL=""
){
local.link = getRequestContext().buildLink(argumentCollection=arguments);
return local.link & (right(local.link,1) NEQ "/" ? "/" : "" );
}
}