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

Shouldn't pubSubScope be sent when publishing data loading topic for a list? #1407

Open
igorbga opened this issue Aug 22, 2018 · 0 comments
Open

Comments

@igorbga
Copy link

igorbga commented Aug 22, 2018

I'm facing some issues when trying to use an AlfSortabolePaginatedList in an Aikau Dashlet.

I have a model like this for the dashlet:

model.jsonModel = {
rootNodeId: args.htmlid,
pubSubScope: instance.object.id,
services: [
{ name: "acme/services/ExpirationNotificationService" }
],
widgets: [
{
id: "ACME_EXPIRATION_NOTIFIED",
name: "acme/dashlets/ExpirationNotified"
}
]
};

The custom widget is just an extended "alfresco/dashlets/Dashlet" thas has the paged list as the widget in it's body. The service is subscribed to ACME_EXPIRATION_NOTIFIED event in order to get the required data and so on...

By checking the Pub/Sub debug information I can see that the service subscribes correctly to the topic by adding the additional pubSubScope prefix. And even the AlfSortablePaginatedList does subscribe to ACME_EXPIRATION_NOTIFIED_SUCCESS and ACME_EXPIRATION_NOTIFIED_FAILURE events by prefixing the scope.

But when loadData method from AlfList is called in order to publish the topic no scope is prefixed so obviously the service does nothing.

Could the problem be here:

setTimeout(lang.hitch(this, this.alfPublish, this.loadDataPublishTopic, payload, true));

Shouldn't this call add this.pubSubScope as an additional parentScope parameter to the call to alfPublish?

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

1 participant