Skip to content

Instantly share code, notes, and snippets.

@erikwett
Created October 22, 2016 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikwett/9a5d38fb0489f41fe090b94036110fe4 to your computer and use it in GitHub Desktop.
Save erikwett/9a5d38fb0489f41fe090b94036110fe4 to your computer and use it in GitHub Desktop.
//getObject returns a promise, so we use the then method to get the model
app.getObject( tabid, id, options ).then( function ( model ) {
//save the model for future use
tabContainer.visualizations[tabid] = model;
//the title will be in the model
tabContainer.setTitle( model, tabid );
//the Validated event will be triggered when there is new data
//use it to update the title
model.Validated.bind( function () {
tabContainer.setTitle( this, tabid );
} );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment