cancel
Showing results for 
Search instead for 
Did you mean: 

autocomplete from fdk

calle
Champ in-the-making
Champ in-the-making
Hi
I try to use the autocomplete.ftl field control that comes with the fdk.jar but alway get a script error like:
YAHOO.util.XHRDataSource is not a constructor
[Break on this error] var oDS = new YAHOO.util.XHRDataSource("/share", oConfigs);

It's part of the javascript in autocomplete.ftl. I can't find the XHRDataSource constructor in the yui libs but I might look in the wrong places.

//Calle
5 REPLIES 5

smicyk
Champ in-the-making
Champ in-the-making
Hi,

probably you should add:

<js src="/yui/datasource/datasource-min.js" />
<js src="/yui/autocomplete/autocomplete-min.js" />

to your forms config.

Thanks,
smicyk

calle
Champ in-the-making
Champ in-the-making
Thanks, that made it work!

g_rathod
Star Contributor
Star Contributor
Hi smicyk ,

I have downloaded FDK (amp and jar) but could not find below files inside it.
1)autocomplete-min.js
2)tab-edit-form.ftl


Does anybody having working FDK ???

I downloded from following source :
alfresco-fdk.amp–>http://process.alfresco.com/ccdl/?file=release/community/build-2765/alfresco-fdk.amp
alfresco-fdk.jar –>http://process.alfresco.com/ccdl/?file=release/community/build-2765/alfresco-fdk.jar

Any help appreciated…

acurs
Champ in-the-making
Champ in-the-making
That might be because all YUI resources are not in the fdk. You might want to look inside share/yui folder where you have autocomple and datasource
cheers

michaelc
Champ on-the-rise
Champ on-the-rise
Hi,

probably you should add:

<js src="/yui/datasource/datasource-min.js" />
<js src="/yui/autocomplete/autocomplete-min.js" />

to your forms config.

Thanks,
smicyk

I might code that as
<@script type="text/javascript" src="/yui/datasource/datasource-min.js" ></@script>
<@script type="text/javascript" src="/yui/autocomplete/autocomplete-min.js" ></@script>

So you can turn debug on/off