11-19-2009 10:32 AM
MycoSites.superclass is undefined
at the MycoSites.supeclass.constructor.call() - detailed below.
<webscript>
<shortname>MyCo Document Sites</shortname>
<description>MyCo document sites with popup</description>
<authentication>user</authentication>
<family>user-dashlet</family>
<url>/components/dashlets/myco-sites</url>
</webscript>
<@script type="text/javascript" src="${page.url.context}/yui/yahoo-dom-event/yahoo-dom-event.js"></@script>
<@script type="text/javascript" src="${page.url.context}/yui/button/button.js"></@script>
<@script type="text/javascript" src="${page.url.context}/yui/container/container.js"></@script>
<@script type="text/javascript" src="${page.url.context}/components/dashlets/myco-sites.js"></@script>
<script type="text/javascript">//<![CDATA[
new MycoSites("${args.htmlid}").setOptions({
}).setMessages(${messages});
new Alfresco.widget.DashletResizer("${args.htmlid}", "${instance.object.id}");
//]]></script>
(function()
{
/**
* YUI Library aliases
*/
var Dom = YAHOO.util.Dom,
Event = YAHOO.util.Event;
/**
* Alfresco Share aliases
*/
var $html = Alfresco.util.encodeHTML;
/**
* Alfresco.SampleComponent constructor.
* @return {Alfresco.SampleComponent} the new component instance
* @constructor
*/
MycoSites = function MycoSites_constructor(htmlId)
{
MycoSites.superclass.constructor.call(this, "MycoSites", htmlId, ["button", "container"]);
this.preferencesService = new Alfresco.service.Preferences();
return this;
};
YAHOO.extend(MycoSites, Alfresco.component.base,
{}
);
11-19-2009 10:48 AM
11-19-2009 11:08 AM
1 - You don't need the YUI includes, as the Share code has already included them for you.Ok, that's good to know, but I figured what the heck - can't hurt to have these included multiple times. But I made the change anyway and still have the same problem.
2 - Is that the whole client-side code? If so, you're not closing the (function(){… part at the end.Sorry, that was a cut and paste error on my part - just missed the last line. The full function is:
(function()
{
/**
* YUI Library aliases
*/
var Dom = YAHOO.util.Dom,
Event = YAHOO.util.Event;
/**
* Alfresco Share aliases
*/
var $html = Alfresco.util.encodeHTML;
/**
* Alfresco.SampleComponent constructor.
* @return {Alfresco.SampleComponent} the new component instance
* @constructor
*/
MycoSites = function MycoSites_constructor(htmlId)
{
MycoSites.superclass.constructor.call(this, "MycoSites", htmlId, ["button", "container"]);
this.preferencesService = new Alfresco.service.Preferences();
return this;
};
YAHOO.extend(MycoSites, Alfresco.component.base,
{}
);
})();
11-19-2009 11:15 AM
extend failed, please check that all dependencies are included.
I was assuming this is from the YAHOO.extend() call, and that it was actually thanks to the superclass failure, but maybe I'm misunderstanding.
MycoSites.superclass is undefined
11-19-2009 01:15 PM
var MycoSites = function MycoSites_constructor(htmlId)
…
// Ensure Myco root object exists
if (typeof Myco == "undefined" || !Myco)
{
var Myco = {};
}
(function()
{
…
Myco.Sites = function… etc.
11-19-2009 01:36 PM
11-19-2009 01:55 PM
11-19-2009 03:16 PM
11-19-2009 03:24 PM
11-19-2009 03:26 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.