AnsweredAssumed Answered

How to get a handle to a webscript package

Question asked by neelesh100 on Aug 8, 2007
Latest reply on Aug 29, 2007 by neelesh100
Hi,

I want to create a custom webscript similar to the indexpackage webscript except I would like to just browse one particular package and I would like to be able to specify the package.  Once this is done, I can get a list of webscripts and the data related to it.

I tried resuing the indexpackagecode but when I specfiy the package in a ftl file as follows (in fact, I even tried using the indexpackage webscript):
.
.
.
<table>
          <@recurseuri package="${url.serviceContext}/index/package${pkgName}"/>
       </table>
       <br>
   
    <#macro recurseuri package>
       <#list package.children as childpath>
          <#if childpath.scripts?size &gt; 0>
            <tr><td><a href="${url.serviceContext}/index/package${childpath.path}">${childpath.path}</a>
          </#if>
          <@recurseuri package=childpath/>
       </#list> 

etc.

I get the following error:

freemarker.template.TemplateException - Expected hash. package evaluated instead to freemarker.template.SimpleScalar


I have even tried <#assign package={pkgname}> and other similar things, but most of the time I get the above mentioned error or  something like "package undefined"


Could someone please tell me how to accomplish this.


I was also wondering if I can multiple .html.ftl files for one webscript.(perhaps I could describe this in the desc.xml file) and if this is possible, somehow use the current indexpackage webscript to meet my requirements, although I would prefer the first solution.




Thanks in advance.
NS.

Outcomes