3

When a primary tab is refreshed, it refreshes all of it's subtabs and application-level custom components. It's possible to prevent the refresh of one of the application-level custom components by overriding it's refresh behavior:

sforce.console.onEnclosingTabRefresh(function() {
  // Whatever you put in here will be run when the page refreshes
});

We have a situation where in general we want to prevent the application-level custom component from refreshing, but sometimes we want to let it force it's own refresh.

Doesn't work:

A typical Javascript refresh will not really update the page since it won't re-run the controller initialization:

location.reload();

Works, but generates errors:

location = "/apex/{!$CurrentPage.Name}?id={!$CurrentPage.parameters.id}&isdtp=vw"

This Javascript command works, but generates console errors because it doesn't load the console-specific HTML that wraps the visualforce page.

How can I force the refresh of a console component?

I don't see any methods available in the Console Integration guide to force the refresh of a console component; the methods to refresh subtabs won't work since console components don't have that kind of ID.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.