AnsweredAssumed Answered

Using ObjectFinder in Javascript

Question asked by garryw on Jan 11, 2013
Hi,

I am after some advise about using the Object Finder from Javascript.

I have a page that works similarly to the discussions create topic page, that when creating a new item it just uses the a freemarker template but editing a item uses the same page but fires an Ajax request to get the details of the topic being edited, and then populates the fields on the success.

To this new page I am trying to add an ObjectFinder using the new Alfresco.ObjectFinder(…..).setOptions(…) which when added through the Freemarker template (using an inline Javascript)  for creating the topic works fine but I cannot see a way of then populating this for the edit page on the Javascript retrieval, so I thought it may be best to create the ObjectFinder on the success when the values are in the Ajax response, however when doing this it looks as though the ObjectFinder object is created successfully but non of the interface appears.

Can anyone suggest what the best way of using this component may be, whether there is any way of setting the currentValue, and where I might be going wrong?

Thanks in advance

Garry

Outcomes