[Helma-user] Strange Problem when including modules/helma/Html.js

Franz Philipp Moser philipp.moser at chello.at
Mon Aug 20 09:02:16 CEST 2007


Hi list,

today I expirienced a strange problem. I use the jala.ListRenderer.
jala.ListRenderer uses Html.js with

{{{
app.addRepository("modules/helma/Html.js");
}}}

The ListRenderer.js is included in Global/onStart()

{{{
app.addRepository("apps/catalog/vendor/jsLibs/jala/code/ListRenderer.js");
}}}

I start up helma (1.6 final on JDK 1.6 Debian Sarge Linux) and render a
List:

{{{
function main_action() {
   if (this.size()) {
      var list = res.handlers.itemlist = new jala.ListRenderer(this);
      list.setPageSize(items);
   }
   res.data.body = this.renderSkinAsString("main");
   res.handlers.context.renderSkin("page");
   return;
}
}}}

In the skin I call the macros of itemlist:

{{{
<% itemlist.pageNavigation %>
<% itemlist.render skin="listItem" %>
<% itemlist.pageNavigation %>
}}}

And I get the following error in my browser:

[Macro error in itemlist.pageNavigation: ReferenceError: "helma" is not
defined. (/home/philipp/helma-1.6.0/modules/helma/Html.js#105)]

I found out that helma doesn't load the Html.js file correctly or
partly, skipping some functions. When I add a return to
modules/helma/Html.js while helma still running and save, everything
works as expected.

If I add Html.js to my apps.properties as a repository (and that is the
only thing that works):

{{{
catalog.repository.3                 = modules/helma/Html.js
}}}

Than everything works fine from the start.

Has anybody expirienced similar Problems, maybe a bug in
app.addRepository()?

cu Philipp


More information about the Helma-user mailing list