• Problem with refresh of ActivityStream datasource

    By F van der Linden 1 decade ago

    On a XPages I can load my Activity Stream with the ActivityStreamDatasource. I use a repeatcontrol to display all the entries. My repeatcontrol has a var="dataSet".

    So far so good.

    When I remove an entry in the Activity Stream in the SBT and I refresh the part of the page, so the data is recollected. My entry is still in the stream. So I think it is a cache issue.

    In the ActivityStreamDatasource I found a parameter 'clearOnRendering', so I switched it to true, so I thought my stream will be refreshed. 

    But now I get an error,

     Activity Stream issue

     

    How can I refresh my ActivityStream data, without error?

    • I tried this option

      By Philippe Riand 1 decade ago

      And it worked for me, using a data view. So I guess this is due to the way your repeat is accessing the data.

      On the other hand, you can also explicitely clear the data source and reset its parameters by calling dataSource.refresh(). The twitter CC is using such a piece of code:

      getComponent('viewPanel1') .getData().refresh()

      • Who do I implement this in a Repeat COntrol

        By F van der Linden 1 decade ago

        I was looking in the repeat control methods but there is no such method getData(). What can I use instead of getData().refresh?

        • The parent of the data source has it

          By Philippe Riand 1 decade ago

          Whenever it is the panel, the view (page) or the view panel. Not that for panel/view, they hold a collection instead of a single entry.

          • It works

            By F van der Linden 1 decade ago

            I changed my Repeat Control to a View panel and load the Activity Stream data source. 

            And now I can remove an entry from the activity Stream and refresh my datasource.