<?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 How can I add a button that executes an expression on my form? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-can-i-add-a-button-that-executes-an-expression-on-my-form/m-p/22363#M9781</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;I am trying to add a button to my form that executes a method of my class. I declare my method as an expression on the button, but it never runs, apparently I'm missing an event definition in the class that defines my button. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;Here my code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public class ButtonFormType extends AbstractFormType implements Serializable {&lt;BR /&gt; private static final long serialVersionUID = 3256341958493366115L;&lt;/P&gt;&lt;P&gt;private static final String TYPE_NAME = "button";&lt;/P&gt;&lt;P&gt;@Override&lt;BR /&gt; public String getName() {&lt;BR /&gt; return TYPE_NAME;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;@Override&lt;BR /&gt; public Object convertFormValueToModelValue(String propertyValue) {&lt;BR /&gt; return propertyValue;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;@Override&lt;BR /&gt; public String convertModelValueToFormValue(Object modelValue) {&lt;BR /&gt; return modelValue == null ? null : modelValue.toString();&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;//BUTTON DEFINITION&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;public ButtonFormPropertyRenderer() {&lt;BR /&gt; super(ButtonFormType.class);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;@Override&lt;BR /&gt; public Field getPropertyField(FormProperty formProperty) {&lt;BR /&gt; Button button = new Button();&lt;BR /&gt; button.setRequired(formProperty.isRequired());&lt;BR /&gt; button.setEnabled(formProperty.isWritable());&lt;BR /&gt; button.addStyleName(Reindeer.BUTTON_DEFAULT);&lt;BR /&gt; button.click();&lt;BR /&gt; &lt;BR /&gt; return button;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//BUTTON IN FORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;activiti:formProperty id="save" name="Save" type="button" expression="${myClass.save(execution, id, variable)}"&amp;gt;&amp;lt;/activiti:formProperty&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jun 2017 16:40:00 GMT</pubDate>
    <dc:creator>davidparraz41</dc:creator>
    <dc:date>2017-06-22T16:40:00Z</dc:date>
    <item>
      <title>How can I add a button that executes an expression on my form?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-can-i-add-a-button-that-executes-an-expression-on-my-form/m-p/22363#M9781</link>
      <description>I am trying to add a button to my form that executes a method of my class. I declare my method as an expression on the button, but it never runs, apparently I'm missing an event definition in the class that defines my button. Here my codepublic class ButtonFormType extends AbstractFormType implement</description>
      <pubDate>Thu, 22 Jun 2017 16:40:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-can-i-add-a-button-that-executes-an-expression-on-my-form/m-p/22363#M9781</guid>
      <dc:creator>davidparraz41</dc:creator>
      <dc:date>2017-06-22T16:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add a button that executes an expression on my form?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-can-i-add-a-button-that-executes-an-expression-on-my-form/m-p/22364#M9782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps this thread is&amp;nbsp;of help -&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/thread/225413"&gt;Buttons to be used inside Alfresco Activiti Task Forms&lt;/A&gt;&amp;nbsp;. If it's a custom&amp;nbsp;action that you're looking to perform perhaps it's something you could&amp;nbsp;do or invoke in javascript or process as part of a task or listener.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2017 14:39:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-can-i-add-a-button-that-executes-an-expression-on-my-form/m-p/22364#M9782</guid>
      <dc:creator>ryandawson</dc:creator>
      <dc:date>2017-07-07T14:39:18Z</dc:date>
    </item>
  </channel>
</rss>

