cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Share Dynamic combobox

ajv
Champ in-the-making
Champ in-the-making
Hello,

I want to add custom behavior to create sites in Share. To do this, I need to call a webscript every time the preset value is changed, because the values of a new combobox should be filled.
To (try to) do this, I modified create-site.js:



YAHOO.util.Event.addListener(this.widgets.isPrivate, "change", this.onVisibilityChange, this, true);

this.widgets.sitePreset = Dom.get(this.id + "-sitePreset");
YAHOO.util.Event.addListener(this.widgets.sitePreset, "change", this.onSitePresetChange, this, true);



/**
* Called when user clicks on the sitePreset combobox.
*
*/
onSitePresetChange: function CS_onSitePresetChange()
{
  // Is possible to call a webscript here???
},
/**
* Called when user clicks on the cancel button.
* Closes the CreateSite panel.
*
* @method onCancelButtonClick
* @param type
* @param args
*/
onCancelButtonClick:

My question is if I can call a web script in create-site.js and fill another combobox from the json data returned by the webscript…
Thanks in advance!!
1 REPLY 1

ajv
Champ in-the-making
Champ in-the-making
Hi!

I found the solution myself:

Alfresco.util.Ajax.jsonGet (
           {
                url: Alfresco.constants.PROXY_URI + "urlWebScript"

Thanks anyway!