0

the tutorial from IBM connections playground is not working for me https://greenhouse.lotus.com/sbt/SBTPlayground.nsf/JavaScriptSnippets.xsp#snippet=Social_ActivityStreams_Controls_Simple_Stream_All_Extensions

this works

require(["sbt/dom", "sbt/config", "sbt/connections/controls/astream/ActivityStreamWrapper"], function(dom, config, ActivityStreamWrapper) {
var activityStreamWrapper = new ActivityStreamWrapper({
    feedUrl: "/basic/rest/activitystreams/@public/@all/@all?rollup=true"
});

dom.byId("activityStreamDiv").appendChild(activityStreamWrapper.domNode);
activityStreamWrapper.startup();
});

efter adding the extension property in configuration, it stops working, nothing displays and no script error can be seen from developer tool,

require(["sbt/dom", "sbt/config", "sbt/connections/controls/astream/ActivityStreamWrapper"], function(dom, config, ActivityStreamWrapper) {
var activityStreamWrapper = new ActivityStreamWrapper({
    feedUrl: "/basic/rest/activitystreams/@public/@all/@all?rollup=true",
    extensions: {
        refreshButton: true
    }
});

dom.byId("activityStreamDiv").appendChild(activityStreamWrapper.domNode);
activityStreamWrapper.startup();
});

I am using Xpages to render the activity stream, the component in use to render all the JS and CSS files is named xe:sbtClient, xpages is using dojo 1.8.6, the rendered sbt js file is dojo 1.4.3. don't know if that is the problem. Here is the complete soucre code in my applicatoin.

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex" dojoParseOnLoad="true"
xmlns:xc="http://www.ibm.com/xsp/custom">

<xe:sbtClient id="sbtClient1" loadDojo="true" loadCSS="true">
</xe:sbtClient>
<div id="activityStreamDiv" style="height:100%;"></div>

<xp:scriptBlock id="scriptBlock1">
    <xp:this.value><![CDATA[
require(["sbt/dom", "sbt/config", "sbt/connections/controls/astream /ActivityStreamWrapper"], function(dom, config, ActivityStreamWrapper) {
var activityStreamWrapper = new ActivityStreamWrapper({
    feedUrl: "/basic/rest/activitystreams/@public/@all/@all?rollup=true",
    extensions: {
        refreshButton: true
    } 
});
dom.byId("activityStreamDiv").appendChild(activityStreamWrapper.domNode);
activityStreamWrapper.startup();
});]]></xp:this.value>
</xp:scriptBlock>


</xp:view>
user3453552
  • 199
  • 1
  • 2
  • 11

2 Answers2

3

So the only difference between the two is the extensions property? There was an issue with extensions in an older version of the toolkit, I think updating to the latest version will solve your issue.

If you have the latest version already then I'll need more information on this problem. I have tried what you suggested in the playground and it works there (select dojo1.8.6 in the JavaScript libraries dropdown)

  • 1. yes, the only difference is the extension property 2. I have Notes9, which include a standard version of SBT, but I do not know if it is the latest one, do you mind sharing the link 3. yes, the playground works, not just 1.8.6, but also 1.4.3. but the problem is that in xpages, the xe:sbtclient always generate js file for dojo 1.4.3, even inside of the application, I am using 1.8.6 – user3453552 Jun 04 '14 at 18:34
  • Notes/Domino does not include a standard version of SBT as far as I know. So you must have installed it yourself and should therefore look into upgrading from http://ibmsbt.openntf.org/. – Per Henrik Lausten Jun 05 '14 at 06:24
0

I have updated the SDK, all the extensions properties can be seen extensions: {    commenting: true,    saving: true,    refreshButton: true,    deleteButton: true }, refresh works, but saving, commenting, delete do not work

error from commenting, it asks me to log in again enter image description here

error from delete, notauthorized even my identity in connections is global administrator enter image description here

error from save enter image description here

user3453552
  • 199
  • 1
  • 2
  • 11