ActionURL wnels2  2008-02-15 14:46
Status: Closed
 
Greetings,
I’m trying to get a url string for the cancel button on the search form. I’m in org.labkey.ms2.pipeline.PipelineController.SequestSearchAction.
If I do this:
ActionURL returnURL = new ActionURL(org.labkey.pipeline.PipelineController.ReturnToRefererAction.class, getContainer());
it will not compile; says that it cannot find the package org.labkey.pipeline.PipelineController?
I’m trying to get a string like this: /labkey/Pipeline/<projectName>/returnToReferrer.view using returnURL.getAction().

How should I be doing this?

Thanks,
BIll
 
 
brendanx responded:  2008-02-15 15:52
Hey Bill,

The correct way to do this is to use a UrlProvider:

ActionURL url = PageFlowUtil.urlProvider(PipelineUrls.class).urlReferer(container);

This is the current best practice for exposing URLs in a module for other modules to use.

Enjoy.

--Brendan