| 8:25:19 PM - Tue, Apr 20th 2010 |
|
At first, I just tried including the key as a param in the site-config.xml
< source name="supportpage" plugin="SupportPages.SupportPage">
<param name="url">http://mysite.net/service/sp</param>
<param name="key">84P2KU2</param>
</ source>
And in my plugin I created an initialise method like this:
void initialise( Map map ) {
url = map.url;
key = map.key;
supportpage = new XmlSlurper(false,false).parse(url + "&key=" + key)
}
That worked perfectly, but when I needed to pull the key out of the config and make it dynamic from the URL, I had something like this:
< source name="supportpage" plugin="SupportPages.SupportPage">
<param name="url">http://mysite.net/service/sp</param>
</ source>
And I would call it with this URL: http://localhost:8080/live/supportpages/i?key=84P2KU2
In my page, using , I could see the value from the url parameter, so the value was available, but it never got passed to the plugin in the map. I also tried making an execute method that was similar to the initialise. Regardless, the getters in my plugin return nothing unless I include the key in the site-config.xml.
Any thoughts on what I'm doing wrong?
Thanks,
Ian
|