* @return the encoded url
*/
protected CharSequence encode(RequestCycle requestCycle,
PageReferenceRequestTarget requestTarget)
{
final PageReference id = requestTarget.getPageReference();
// Start string buffer for url
final AppendingStringBuffer url = new AppendingStringBuffer(64);
url.append('?');
url.append(INTERFACE_PARAMETER_NAME);
url.append('=');
// add pagemap
if (!Objects.equal(PageMap.DEFAULT_NAME, id.getPageMapName()))
{
url.append(id.getPageMapName());
}
url.append(Component.PATH_SEPARATOR);
// add page id
url.append(id.getPageNumber());
url.append(Component.PATH_SEPARATOR);
// add version
url.append(id.getPageVersion());
url.append(Component.PATH_SEPARATOR);
// add listener interface (noop because we default to redirect listener which is default)
url.append(Component.PATH_SEPARATOR);