4

I am writing a small GUI Extension to get the WhereUsed list from Tridion and have some related posts here and here.

I created some sample content, linked them together (component links) and it appears in my GUI Extension and the WhereUsed window from the Component. Went to lunch, came back, list is empty. But, also when I select the WhereUsed button in Tridion 2011 SP1, it's also empty. Then, I select the 'refresh' buton on the popup and the WhereUsed items are back - but not in my GUI Extension.

I'm using the special callback fom Jaime's post here . But, is there another magic method I'm missing to reload the list?

I'm now thinking to use the Core Service to do my WhereUsed bidding for me instead of the Anguilla framework.

1 Answer 1

4

I think you need to load the item in question too. For example, if you do a "where used" in an item, call the load method item.load(true), in the same way you do for the list (in my previous post). You will need the item to be loaded in order to access its information. Something like this:

var item = $models.getItem("tcm:1-234");
function onItemLoaded{
        $evt.removeEventHandler(item, load, onItemLoaded);
    ShowWhereUsed(item.getId(), ["16"], ["tcm:1-235-8"]); //Assuming this is the function I posted in my previous posts
}

if(item.isLoaded()){
    onItemLoaded();
}else{
    $evt.addEventHandler(item, "load", onItemLoaded);
    item.load(true);
}

Note: this is an educated guess. Another reason for the "disappearance" of the list might be browser-cache-related.

2
  • I just checked, and it seems that loading the "item" is necessary. The only element that needs to be loaded (if not already so) is the list. Commented Dec 6, 2013 at 15:49
  • correction: loading the item is NOT necessary Commented Dec 6, 2013 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.