<?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 Custom form stencils: How to pass customParameter to controller? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/custom-form-stencils-how-to-pass-customparameter-to-controller/m-p/38636#M16248</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yet another question regarding custom form stencils (related to &lt;A _jive_internal="true" href="https://community.alfresco.com/thread/234198-populate-select-options-from-a-webservice-in-a-custom-stencil" rel="nofollow noopener noreferrer"&gt;my other question from today&lt;/A&gt;). I've created my own form stencil that return some values from a webservice. Now I want to make it a bit more flexible but I stuck with the stencil properties.&amp;nbsp;For example, I want to provide a textfield that should contain the base URL of my webservice. I've created the&amp;nbsp;property (type: "Text"), I can see it in the process definition and finally,&amp;nbsp;the value of it is even available in the task. If I put the following line in my &lt;STRONG&gt;runtime template&lt;/STRONG&gt;, the correct value will be printed:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;span&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;params&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;customProperties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;myWebserviceURL&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;span&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;‍&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="comment token"&gt;&lt;SPAN&gt;// I see my specified value like: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost:8080‍‍‍‍‍‍" rel="nofollow noopener noreferrer" target="_blank"&gt;http://localhost:8080‍‍‍‍‍‍&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What I'm now looking for, is to pass this value to my controller script and what I've tried so far is to use the &lt;STRONG&gt;ng-init&lt;/STRONG&gt; for that:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;select ... ng-model="myCompanyCode" &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ng-init="init('{{field.params.customProperties.myWebserviceURL}}')"&amp;gt;‍‍&amp;lt;/select&amp;gt;‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and in the controller script:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;$scope&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;init &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Passed URL: "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; url&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $scope&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;myWebserviceURL &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; url&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Unfortunately, I get the full parameter name in the function, meaning&amp;nbsp;&lt;EM&gt;{{field.params.customProperties.myWebserviceURL}}&amp;nbsp; &lt;/EM&gt;and not the translated value as in the runtime template:&amp;nbsp;&lt;A _jive_internal="true" href="https://community.alfresco.com/localshost:8080)" rel="nofollow noopener noreferrer"&gt;http://localhost:8080)&lt;/A&gt;. If I remove the single quotes in the function call, I get a parse error...&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;ng&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;init&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"init({{field.params.customProperties.connexas4processWebserviceURL}})"&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how to pass these parameters, so that I can use it in the controller?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And another question, maybe &lt;B&gt;Ciju Joseph&lt;/B&gt;‌ can answer this: Will it be possible in a future release to have more property types available that can be used for custom properties? Right now I can use "Text", "Text (multi line)" and "Variable" but at least it would be nice (necessary?) to have the capability to create parameters for "Radio Button", "Checkbox" and even "Dropdown" as well!?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Nov 2017 16:14:36 GMT</pubDate>
    <dc:creator>mario_fliegner</dc:creator>
    <dc:date>2017-11-08T16:14:36Z</dc:date>
    <item>
      <title>Custom form stencils: How to pass customParameter to controller?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-form-stencils-how-to-pass-customparameter-to-controller/m-p/38636#M16248</link>
      <description>Hi guys,&amp;nbsp;yet another question regarding custom form stencils (related to my other question from today). I've created my own form stencil that return some values from a webservice. Now I want to make it a bit more flexible but I stuck with the stencil properties.&amp;nbsp;For example, I want to provide a text</description>
      <pubDate>Wed, 08 Nov 2017 16:14:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-form-stencils-how-to-pass-customparameter-to-controller/m-p/38636#M16248</guid>
      <dc:creator>mario_fliegner</dc:creator>
      <dc:date>2017-11-08T16:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom form stencils: How to pass customParameter to controller?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-form-stencils-how-to-pass-customparameter-to-controller/m-p/38637#M16249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you not get it from $scope.field.params.customProperties.... directly in the controller?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the roadmap question, I'm not sure if that is planned or not. I recommend you to contact your account representative if you would like a roadmap session&amp;nbsp;from PM team. Or feel free to raise a feature request via the support portal for adding more types in the future!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ciju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2017 16:27:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-form-stencils-how-to-pass-customparameter-to-controller/m-p/38637#M16249</guid>
      <dc:creator>cjose</dc:creator>
      <dc:date>2017-11-08T16:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom form stencils: How to pass customParameter to controller?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-form-stencils-how-to-pass-customparameter-to-controller/m-p/38638#M16250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Ciju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, now I'm able to access the properties from the $scope object. Not sure why it hasn't worked yesterday. The solution was maybe to restart my computer, open the windows in the office and bring my junior to the kindergarten by car. That's all I've done today so far... and now it works...&amp;nbsp;&lt;IMG src="https://connect.hyland.com/legacyfs/online/alfresco/emoticons/devil.png" /&gt;&lt;IMG src="https://connect.hyland.com/legacyfs/online/alfresco/emoticons/laugh.png" /&gt;&lt;IMG src="https://connect.hyland.com/legacyfs/online/alfresco/emoticons/laugh.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the roadmap, I will raise an issue in the partner portal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 08:47:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-form-stencils-how-to-pass-customparameter-to-controller/m-p/38638#M16250</guid>
      <dc:creator>mario_fliegner</dc:creator>
      <dc:date>2017-11-09T08:47:32Z</dc:date>
    </item>
  </channel>
</rss>

