AnsweredAssumed Answered

Custom autocomplete form control in simple dialog

Question asked by systec on Jan 27, 2011
I'm busy with an upgrade from Alfresco Share 3.2 to 3.4 and while i like the new feature that allows one to edit all metadata in the document library via the popup, my custom form controls no longer work. However when using the full blown edit metadata page they still work.

I found that simple-dilaog.js, which is used to build the popup, uses Alfresco.util.Ajax to make the request. In this case Alfresco.util.Ajax is configured to execute returned scripts, however it does so before any returned html is injected into the DOM. It then removes the script before returning control to simple-dialog which finally injects the html into the DOM.

In my case i'm using a custom YUI autocomplete form control. With the potential of having more than one control on a form, i need to reference a unique DOM element in the script. This can't be done as the DOM element is not available at script execution time. Secondly the control needs to register mouse events, something it can no longer do as the script is removed after execution and not available on the rendered form.

It doesn't seem like the simple dialog framework can accommodate such custom controls with the above-mentioned behaviour.

Outcomes