cancel
Showing results for 
Search instead for 
Did you mean: 

Recently Modified Documents opening in iFrame

cnihill
Champ in-the-making
Champ in-the-making
Hi all,

I would greatly appreciate any help anyone can offer me with this.

I am using Alfresco Share Enterprise 3.1.
I have a dashlet in Share which contains an activeX component that displays word files. This dashlet contains a menu bar which can control what document is opened in the word viewer.

My difficulty is, I am looking to allow a user to click on a document link in the 'Recently Modified Documents' dashlet and have the document itself displayed in the dashlet containing the iFrame. The iFrame is declared in the head.ftl file of the word previewer dashlet but I am unsure whether the Recently modified Documents dashlet can determine what displays in the other dashlet. There does not seem to be an out of the box equivalent scenario with other dashlets talking to each other.

Can anyone tell me if this is possible and if so how I might go about it?

Thanks,
Clem.
1 REPLY 1

mikeh
Star Contributor
Star Contributor
This is possible, through use of the YAHOO.Bubbling library, which we use to message between components (although not currently on the dashboard).

Customise the Recently Modified Documents dashlet so it fires a custom event when you click on a document, e.g. YAHOO.Bubbling.fire("displayWordDocument", params) where params contain enough information to identify the document in the display dashlet - e.g. the nodeRef.

The in the display dashlet: YAHOO.Bubbling.on("displayWordDocument", this.onDisplayWordDocument, this) and define a JavaScript function to handle the event.

The Share code contains lots of examples where we use the Bubbling library already, so this should be possible without too much trouble.

Thanks,
Mike