cancel
Showing results for 
Search instead for 
Did you mean: 

loadDataPublishPayload doesn't work

saruqui
Champ in-the-making
Champ in-the-making

Hi!

I'm trying to show a documents list in a dashlet and it works when I'm directly including the nodes with the currentData property but it's not working when I'm using loadDataPublishPayload. The code goes like this:

define(
[ "dojo/_base/declare", "alfresco/core/Core",
"alfresco/core/I18nUtils", "alfresco/dashlets/Dashlet" ],
function(declare, AlfCore, I18nUtils, Dashlet) {
return declare(
[ Dashlet ],
{
....
widgetsForBody : [ {
id : "MY_DASHLET_VERTICAL_LAYOUT",
name : "alfresco/layout/VerticalWidgets",
config : {
widgets : [
{
id : "MY_DASHLET_MY_CRUD",
name : "alfresco/lists/AlfList",
config : {
loadDataPublishTopic : "ALF_CRUD_GET_ALL",
waitForPageWidgets: false,
loadDataPublishPayload : {
url : "test/my-list"
},
itemsProperty : "items",
widgets : [ {
name : "alfresco/documentlibrary/views/AlfDocumentListView",
config : {
widgets : [ {
id : "VIEW_ROW",
..............

Whenever I directly call the url http://localhost:8080/alfresco/service/test/my-list in a browser everything works, but this webscript isn't calling when I'm showing this dashlet and, of course, I don't get any result or console error. I've tried using a Share webscript (adding urlType: "SHARE") and it's not working.

Any idea?

1 REPLY 1

ddraper
World-Class Innovator
World-Class Innovator
  • What version of Alfresco and Aikau are you using?
  • Have you tried out the steps as outlined in this blog post: https://community.alfresco.com/community/ecm/blog/2016/09/27/how-to-create-an-aikau-dashlet-for-shar... ?
  • What debugging into this have you done so far? Have you used the DebugLog widget to inspect what publications and subscriptions are occurring?
  • Have you set any break points on any of the code that is expected to be executed (such as the "loadData" function in the AlfList module?
  • Are you seeing any errors in the browser console? (make sure you're running with client debug mode enabled)
  • Are you seeing any XHR requests being made in the browser developer tools?
  • How are you trying to access this code? It's very hard to tell from the snippets of code you've provided - perhaps you can provide the entire example?
  • Is the CrudService actually on the page?

Because of the way that Aikau is implemented we have many, many implementations and unit tests going through this code path so it is most likely to be either:

  1. A pub/sub scoping issue or the initial publication not being made
  2. A missing service
  3. The widgets not being defined correctly
  4. A mis-match between the WebScript response schema and the configuration for the list