Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13.14 opensocial.data API and examples are incorrect #1343

Open
simonhewett opened this issue Feb 19, 2014 · 1 comment
Open

13.14 opensocial.data API and examples are incorrect #1343

simonhewett opened this issue Feb 19, 2014 · 1 comment

Comments

@simonhewett
Copy link

The example for 13.14 has an incorrect method for getting the DataContext:

var viewer = opensocial.data.getContext().getDataSet('Viewer');
alert('Hello ' + viewer.name);
os.data.getDataContext().putDataSet('Params', {"Page": 2, "PageSize": 10});
opensocial.data.getDataContext().registerListener('Friends', function(key) {
   var el = document.getElementById('friend-details');
   el.style.display = 'show';
});

So should be updated to this:

var viewer = opensocial.data.getDataContext().getDataSet('Viewer');
alert('Hello ' + viewer.name);
opensocial.data.getDataContext().putDataSet('Params', {"Page": 2, "PageSize": 10});
opensocial.data.getDataContext().registerListener('Friends', function(key) {
   var el = document.getElementById('friend-details');
   el.style.display = 'show';
});

And the API definition for 13.14.1 is incorrect:

13.14.1 getContext 

Signature
<static> DataContext opensocial.data.getContext()

So should be updated to this:

13.14.1 getDataContext

Signature
<static> DataContext opensocial.data.getDataContext()
@mgmarum
Copy link

mgmarum commented Feb 21, 2014

Thanks Simon, I'll look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants