Your page class define (Example YourBasePageClass):

        @InjectObject("engine-service:external")
        public abstract IEngineService getExternalService();

        public ILink getExternalLink(String pageName, Object[] parameters) {
                ExternalServiceParameter esp = new 
ExternalServiceParameter(pageName,
                                parameters);
                return getExternalService().getLink(false, esp);
        }

Your require parameters page class:

public abstract class YourPageClass extends BasePage implements
                IExternalPage {
        public abstract void setName(String name);
        public void activateExternalPage(Object[] parameters, RequestCycle 
cycle) {
            setName(parameters[0].toString()));
        }

}

invoke:

public ILink yourListenerMethod(){
         return getExternalLink("YourPageClass","your name");
}


Leo Sakhvoruk wrote:
I'm trying to figure out how to use an ILink return type for a listener method in my page. I'm wanting to use it for the purpose of redirect-after-post in order so that the page the user is sent to displays the correct URL for it for page refreshes and user tracking statistics.

It seems ok for pages that don't require parameters but how would I construct an ILink for a page that renders data that is passed to it via parameters and such? The page service doesn't handle that so what service should I use when constructing a link or is there even a way to do that?

Thanks in advance.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to