cancel
Showing results for 
Search instead for 
Did you mean: 

how to put dynamic dashlet

rekhaahir
Champ on-the-rise
Champ on-the-rise

i want to learn how to put dynamic dashlet in alfresco share so for that if any one have good stuff or link then please share here.i want to put dashlet on button click .

Thank you.

1 ACCEPTED ANSWER

You can define form inside share-config-custom.xml file.For opening that form on click of link or button use below java script code.You need to change certain parameters in same.

 Alfresco.util.Ajax.request({             url: Alfresco.constants.URL_SERVICECONTEXT + "components/form",             dataObj: {                 htmlid: this.id + "-startWorkflowForm-" + Alfresco.util.generateDomId(),                 itemKind: "workflow",                 itemId: workflowDefinition.name,                 mode: "create",                 submitType: "json",                 showCaption: true,                 formUI: true,                 showCancelButton: true,                 destination: this.options.destination             },             successCallback: {                 fn: this.onWorkflowFormLoaded,                 scope: this             },              failureMessage: this.msg("message.failure"),                 scope: this,                 execScripts: true         });

View answer in original post

4 REPLIES 4

krutik_jayswal
Elite Collaborator
Elite Collaborator

You can not add dynamic dashlet, but if you can explain your requirement , than I will be able to suggest proper way to implement it.

rekhaahir
Champ on-the-rise
Champ on-the-rise

when i click button then one form will be open with the fields in which i fill data and then submit it. so how can i do that .

thank you

You can define form inside share-config-custom.xml file.For opening that form on click of link or button use below java script code.You need to change certain parameters in same.

 Alfresco.util.Ajax.request({             url: Alfresco.constants.URL_SERVICECONTEXT + "components/form",             dataObj: {                 htmlid: this.id + "-startWorkflowForm-" + Alfresco.util.generateDomId(),                 itemKind: "workflow",                 itemId: workflowDefinition.name,                 mode: "create",                 submitType: "json",                 showCaption: true,                 formUI: true,                 showCancelButton: true,                 destination: this.options.destination             },             successCallback: {                 fn: this.onWorkflowFormLoaded,                 scope: this             },              failureMessage: this.msg("message.failure"),                 scope: this,                 execScripts: true         });

rekhaahir
Champ on-the-rise
Champ on-the-rise

Thank you .