Forum .LRN Q&A: linking core functionality package to a dotLRN applet
I am having a problem connecting up my first dotLRN portlet. I have created a new package that I called java-applet that simply displays a java applet. It works when I access the package directly by going to http://MYDOMAIN/java-applet.
Once this was created I followed the instructions from the integrating an existing package in dotLRN thread and used the very nice shell script there to create the dotlrn-java-applet package and the java-applet-portlet packages and installed these. I have set up the applet to display in my space and have also added it to a community and i can get the portlet window to display however, all that displays is the title of the applet and not the java-applet itself.
Where the java-applet-portlet.apd file says to insert template info here, I am unsure of what to add to hook it up to my java-applet index.apd - where the applet info is stored.
If your lost I'll try to explain it better... If not, this is probably really simple to solve but I can't seem to find any documents to help with this problem! Perhaps if someone has some source code with similar content? I've tried looking at my existing packages such as surveys but I can't seem to decipher which bits I need. (I'm going to be using the community id within the applet, hence it's not a static portlet)
Any help or suggestions would be wonderful!
THe "insert template here" placeholder means you need to do one of two things.
1) Copy the code from your application ADP template into the portlet ADP template. You also need to get the Tcl code into the portlet Tcl script as well.
2) Extract the parts of your template that are reusable (usually everthing after the master and property tags) and put that in a reusable ADP. Then you can include this in your applicaiton page and the portlet page.
I copied the code straight into the portlet ADP template as you suggested and it works fine. However should I not somehow be using the code from my index.adp in the java-applet package to create the output without simply copying it out?
Is there a very simple package which I could download to help me to get my head around the way the packages work and link together? I am struggling to figure out how it all fits and how to use the template system. I am re-reading the documentation for open ACS package development but it’s not that clear with regards to linking into dotlrn, and there are limited examples.
Sorry for being such a newbie but I want to do things properly from the start as we have a large dotlrn project on the go.