<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged entity-picker</title>
<link>https://overflow.efficy.io/?qa=tag/entity-picker</link>
<description>Powered by Question2Answer</description>
<item>
<title>Efficy 11: new action mechanism ... and grid tag #A on Launch Template menu ?</title>
<link>https://overflow.efficy.io/?qa=3183/efficy-new-action-mechanism-and-grid-tag-launch-template-menu</link>
<description>&lt;p&gt;Dear all,&lt;/p&gt;

&lt;p&gt;I did struggle a bit to understand how the new action mechanism was working with the &quot;Launch Template&quot; menu in Efficy Edit Document  window and the new entity picker that has been added to this menu and I wanted to share my finding with all of you.&lt;/p&gt;

&lt;p&gt;First I have to find how the template windows was displayed when we click in the new EntityPicker &quot;FullSearch&quot; Button.&lt;/p&gt;

&lt;p&gt;The important part here is in the CmdTemplate macro in MacroEdit.txt where you can find the following code: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;%CreateEditButton(actioncode=&quot;CEB_SEL_TMPL&quot;, action=&quot;javascript:SelectTemplates('runTemplate;#EDITHANDLE;$K', TmplFilterHTML)&quot;)%&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This code is very import, because it will be the Javascript code that will be called once the EntityPicker full Search button (macro EntityPickerButtonFullSearch in MacroAjax.txt) is pushed. This button will call a &lt;code&gt;CebPerform('CEB_SEL_TMPL')&lt;/code&gt; in the function “&lt;code&gt;fullSearch&lt;/code&gt;” in the entitypickerCmd.js.&lt;/p&gt;

&lt;p&gt;You can find the “&lt;code&gt;SelectTemplates&lt;/code&gt;” function in efficy\scripts\Efficy.js file, and this function is only opening a new windows with the url pointing to the dialog/Template.htm page and passing the action with the new defined format that you can find in the Release note.&lt;/p&gt;

&lt;p&gt;Now that I understood how the window opened, I search how the action to run the template was done.&lt;/p&gt;

&lt;p&gt;Before in older version of Efficy the Template.htm page was displaying a grid and the action to run the template was setup in the GridColumn.txt “&lt;code&gt;td.PERFORMNAME&lt;/code&gt;”. This grid definition was just using a simple HTML link pointing to the JavaScript function “&lt;code&gt;Perform&lt;/code&gt;” that was in the Template.htm page ... so quite easy to find.&lt;/p&gt;

&lt;p&gt;Now, in Efficy 11, if I am right, there is a new grid tag &lt;strong&gt;&lt;code&gt;&amp;lt;#A&amp;gt;&lt;/code&gt;&lt;/strong&gt;. This grid tag is used to generate the HTML link but by using the data-msg and it also get the action passed to the Template.htm and replace the $ arguments such as $K by the value of the key.&lt;/p&gt;

&lt;p&gt;You can find the action in the CreateEditButton we spoke previously and which was in our case &lt;code&gt;'runTemplate;#EDITHANDLE;$K'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here is an example of the HTML link generated by the &lt;strong&gt;&lt;code&gt;&amp;lt;#A&amp;gt;&lt;/code&gt;&lt;/strong&gt; tag, as you can see the $K past to in the Action has been replaced automatically by the Template key. &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;#&quot; data-msg=&quot;action;runTemplate;4;99999028&quot;&amp;gt;Extranet - Set Password (EN)&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The answer I didn't find yet is how efficy.dll knew that &lt;code&gt;$K&lt;/code&gt; should take the K_TEMPLATE because it is not specified in either the &lt;code&gt;RunQuery&lt;/code&gt; or the &lt;code&gt;GetDialogGrid&lt;/code&gt; that we can find in Template.htm page?&lt;/p&gt;

&lt;p&gt;Hope this will help some of you ;)&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3183/efficy-new-action-mechanism-and-grid-tag-launch-template-menu</guid>
<pubDate>Fri, 25 May 2018 13:00:42 +0000</pubDate>
</item>
<item>
<title>Touch &quot;Enter&quot; on entity picker in Edit - Chrome &amp; FF - R6640</title>
<link>https://overflow.efficy.io/?qa=852/touch-enter-on-entity-picker-in-edit-chrome-ff-r6640</link>
<description>&lt;p&gt;Dear All,&lt;/p&gt;

&lt;p&gt;On the build R6640, pressing &quot;Enter&quot; on the entity picker in edit mode close this entity picker, instead of validating the chosen record.&lt;/p&gt;

&lt;p&gt;This bug happens only with Chrome and FF. &lt;/p&gt;

&lt;p&gt;This will be corrected in the next release, and here is the fix for this build :&lt;/p&gt;

&lt;p&gt;In MacroEditCustom.txt :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;DefaultSubmitButton {[&amp;lt;input type=&quot;text&quot; style=&quot;/*Force*/display:none;&quot;&amp;gt;]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Geoffrey&lt;/p&gt;
</description>
<category>Minor bug fixes</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=852/touch-enter-on-entity-picker-in-edit-chrome-ff-r6640</guid>
<pubDate>Fri, 16 Oct 2015 11:15:39 +0000</pubDate>
</item>
</channel>
</rss>