Hello guys,

I'm fighting a bit with RequireJS modules. So...

I have Tapestry library 'cms' with 'LastArticle' component. So I have simple RequireJS module in
resources/META-INF/modules/cms folder with following code

define(["jquery", "t5/core/dom", "jquery/jquery.threedots.min"], function ($, dom)
{
init = function (rowsCount)
{
$('.preview').ThreeDots({ max_rows: rowsCount });
}
});

and in LastArticle.java I call:

scriptSupport.require("LastArticle").invoke("init").with(previewLinesCount);

in SetupRender method.

In javascript console then I can see error "TypeError: moduleLib is undefined". So either I still don't fully understand this concept or I've missed something. Could you please help me? Thanks a lot in advance!

Best,
Jan

Reply via email to