<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic AlfButton in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/alfbutton/m-p/70419#M23123</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How Can I add an action to the button.&lt;/P&gt;&lt;P&gt;var Button =&amp;nbsp; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name: "alfresco/buttons/AlfButton",&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;config: {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;label: "click to update"&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; };&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Apr 2019 15:22:04 GMT</pubDate>
    <dc:creator>riadhazzouz</dc:creator>
    <dc:date>2019-04-05T15:22:04Z</dc:date>
    <item>
      <title>AlfButton</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfbutton/m-p/70419#M23123</link>
      <description>How Can I add an action to the button.var Button =&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name: "alfresco/buttons/AlfButton", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;config: { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;label: "click to update" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} };</description>
      <pubDate>Fri, 05 Apr 2019 15:22:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfbutton/m-p/70419#M23123</guid>
      <dc:creator>riadhazzouz</dc:creator>
      <dc:date>2019-04-05T15:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: AlfButton</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfbutton/m-p/70420#M23124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Asuming you are trying to execute a custom action, you must to&amp;nbsp;use the property publishTopic of AlfButton to set the topic to publish when the button is clicked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://dev.alfresco.com/resource/docs/aikau-jsdoc/AlfButton.html" title="https://dev.alfresco.com/resource/docs/aikau-jsdoc/AlfButton.html" rel="nofollow noopener noreferrer"&gt;JSDoc: Module: alfresco/buttons/AlfButton&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then yoy need to implement a custom service to subscribe this topic and handle the action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look to AIKAU tutorial :&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Alfresco/Aikau/blob/develop/tutorial/chapters/Tutorial7.md" title="https://github.com/Alfresco/Aikau/blob/develop/tutorial/chapters/Tutorial7.md" rel="nofollow noopener noreferrer"&gt;Aikau/Tutorial7.md at develop · Alfresco/Aikau · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Apr 2019 09:36:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfbutton/m-p/70420#M23124</guid>
      <dc:creator>roberto_gamiz</dc:creator>
      <dc:date>2019-04-06T09:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: AlfButton</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfbutton/m-p/70421#M23125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found a problem in step 4 : Create Service.&lt;BR /&gt;I can't find the path to create that file in my project.&lt;/P&gt;&lt;P&gt;And is there a way to pass the attributes without creating the textBox for each one ? I just don't have fields to fill&lt;BR /&gt;but I do have parameters to pass.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2019 07:21:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfbutton/m-p/70421#M23125</guid>
      <dc:creator>riadhazzouz</dc:creator>
      <dc:date>2019-04-09T07:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: AlfButton</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfbutton/m-p/70422#M23126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I succeded creating the service, this is the code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define(["dojo/_base/declare",&lt;BR /&gt; "alfresco/core/Core",&lt;BR /&gt; "dojo/_base/lang",&lt;BR /&gt; "alfresco/core/CoreXhr",&lt;BR /&gt; "service/constants/Default"],&lt;BR /&gt; function(declare, Core, lang) {&lt;BR /&gt; &lt;BR /&gt; return declare([Core], {&lt;BR /&gt; &lt;BR /&gt; constructor: function service_change_status__constructor(args) {&lt;BR /&gt; lang.mixin(this, args);&lt;BR /&gt; this.alfSubscribe("SERVICE_CHANGE_STATUS", lang.hitch(this, this.changeStatus));&lt;BR /&gt; },&lt;BR /&gt; &lt;BR /&gt; changeStatus: function service_change_status__changeStatus(payload) {&lt;BR /&gt; &lt;BR /&gt; this.serviceXhr({&lt;BR /&gt; url: AlfConstants.PROXY_URI + "/alfresco/s/pfe/status?id=" + payload.id,&lt;BR /&gt; method: "POST",&lt;BR /&gt; successCallback: this.onSuccess,&lt;BR /&gt; callbackScope: this&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; },&lt;BR /&gt; onSuccess: function service_change_status__onSuccess(response, originalRequestConfig) {&lt;BR /&gt; this.alfPublish("ALF_DOCLIST_RELOAD_DATA", {});&lt;BR /&gt; },&lt;BR /&gt; onFailure: function service_change_status_onFailure(response, originalRequestConfig) {&lt;/P&gt;&lt;P&gt;Alfresco.util.PopupManager.displayMessage({ title: this.message("export.search.result"), text: this.message("export.search.result.no")});&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this is the button :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var button= {&lt;BR /&gt; name: "alfresco/buttons/AlfButton",&lt;BR /&gt; config: {&lt;BR /&gt; label: "button",&lt;BR /&gt; publishTopic: "SERVICE_CHANGE_STATUS",&lt;BR /&gt; publishPayload: {&lt;BR /&gt; id :id&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but still nothing happens once i click the button.&lt;BR /&gt;Any help ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 07:12:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfbutton/m-p/70422#M23126</guid>
      <dc:creator>riadhazzouz</dc:creator>
      <dc:date>2019-04-10T07:12:21Z</dc:date>
    </item>
  </channel>
</rss>

