<?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 Re: Aikau AlfSearchResult bad behavior in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/aikau-alfsearchresult-bad-behavior/m-p/279905#M233035</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;First of all ... What versions of Alfresco and Aikau are you using?&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;My bad, there it goes... Aikau 1.0.83 Alfresco 5.1.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #727174;"&gt;So essentially you're just creating a custom version of the AlfSearchResult widget that is (in theory) exactly the same as the original? (or have you omitted some of your code?)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That's it, exactly the same (at least for now). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #727174; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;One thing I would say is that you should definitely define your custom models in a specific package (rather than just "js") as I've seen this cause problems before - I can't remember where or why - just that I'm fairly sure it's caused problems in the past!&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;ok, done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Are you getting any errors in the browser console? (make sure you're running in client debug mode - and have enabled logs)&lt;/P&gt;&lt;P&gt;Other things to suggest when debugging would be to set the browser developer tools to break on exceptions and see if something is breaking somewhere.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Logs are enabled, no errors.&lt;/P&gt;&lt;P&gt;I added this.alfLog("log","I'm Here") and it's calling from inside my scope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The custom widget it's working fine, I got a call for each result, it renders and returns... &lt;/P&gt;&lt;P&gt;I just need to click two times to send the search to it, which is not the same behavior as the native one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the tips! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Oct 2016 20:32:40 GMT</pubDate>
    <dc:creator>nilsonmorais</dc:creator>
    <dc:date>2016-10-21T20:32:40Z</dc:date>
    <item>
      <title>Aikau AlfSearchResult bad behavior</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/aikau-alfsearchresult-bad-behavior/m-p/279903#M233033</link>
      <description>Hi,I'm having some problem extending AlfSearchResult, when using the native widget it works well, but when I try extending it still shows the results, but only when I trigger the search event for the second time (Two clicks on search button for example), instead it shows Search Suggestions.I did the</description>
      <pubDate>Fri, 21 Oct 2016 17:04:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/aikau-alfsearchresult-bad-behavior/m-p/279903#M233033</guid>
      <dc:creator>nilsonmorais</dc:creator>
      <dc:date>2016-10-21T17:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Aikau AlfSearchResult bad behavior</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/aikau-alfsearchresult-bad-behavior/m-p/279904#M233034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all ... What versions of Alfresco and Aikau are you using? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So essentially you're just creating a custom version of the AlfSearchResult widget that is (in theory) exactly the same as the original? (or have you omitted some of your code?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing I would say is that you should definitely define your custom models in a specific package (rather than just "js") as I've seen this cause problems before - I can't remember where or why - just that I'm fairly sure it's caused problems in the past!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you getting any errors in the browser console? (make sure you're running in client debug mode - and have enabled logs)&lt;/P&gt;&lt;P&gt;Other things to suggest when debugging would be to set the browser developer tools to break on exceptions and see if something is breaking somewhere.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 17:43:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/aikau-alfsearchresult-bad-behavior/m-p/279904#M233034</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2016-10-21T17:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Aikau AlfSearchResult bad behavior</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/aikau-alfsearchresult-bad-behavior/m-p/279905#M233035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;First of all ... What versions of Alfresco and Aikau are you using?&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;My bad, there it goes... Aikau 1.0.83 Alfresco 5.1.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #727174;"&gt;So essentially you're just creating a custom version of the AlfSearchResult widget that is (in theory) exactly the same as the original? (or have you omitted some of your code?)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That's it, exactly the same (at least for now). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #727174; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;One thing I would say is that you should definitely define your custom models in a specific package (rather than just "js") as I've seen this cause problems before - I can't remember where or why - just that I'm fairly sure it's caused problems in the past!&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;ok, done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Are you getting any errors in the browser console? (make sure you're running in client debug mode - and have enabled logs)&lt;/P&gt;&lt;P&gt;Other things to suggest when debugging would be to set the browser developer tools to break on exceptions and see if something is breaking somewhere.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Logs are enabled, no errors.&lt;/P&gt;&lt;P&gt;I added this.alfLog("log","I'm Here") and it's calling from inside my scope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The custom widget it's working fine, I got a call for each result, it renders and returns... &lt;/P&gt;&lt;P&gt;I just need to click two times to send the search to it, which is not the same behavior as the native one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the tips! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 20:32:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/aikau-alfsearchresult-bad-behavior/m-p/279905#M233035</guid>
      <dc:creator>nilsonmorais</dc:creator>
      <dc:date>2016-10-21T20:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Aikau AlfSearchResult bad behavior</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/aikau-alfsearchresult-bad-behavior/m-p/279906#M233036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm still totally confused as to why two clicks would be required - let me know if you find the answer!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 08:02:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/aikau-alfsearchresult-bad-behavior/m-p/279906#M233036</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2016-10-24T08:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Aikau AlfSearchResult bad behavior</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/aikau-alfsearchresult-bad-behavior/m-p/279907#M233037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dave,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Kinda found the problem. Looking the logs, at some point &lt;EM&gt;&lt;STRONG&gt;alfresco_lists_views_layout___MultiItemRendererMixin__renderData&lt;/STRONG&gt;&lt;/EM&gt; is called and do a &lt;EM&gt;&lt;STRONG&gt;renderNextItem&lt;/STRONG&gt;&lt;/EM&gt; for each item in search results. Then it calls &lt;EM&gt;&lt;STRONG&gt;MultiItemRendererMixin-&amp;gt;renderNextItem,&lt;/STRONG&gt;&lt;/EM&gt; which calls &lt;EM&gt;&lt;STRONG&gt;this.processWidgets(clonedWidgets, this.containerNode)&lt;/STRONG&gt;&lt;/EM&gt;, here the cloned widget is a instance of my custom AlfSearchResult, which should be rendered in containerNode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then when I click on the "search button" on my page and I stop at the line &lt;EM&gt;&lt;STRONG&gt;this.processWidgets(clonedWidgets, this.containerNode)&lt;/STRONG&gt;&lt;/EM&gt;, the DOM element (&lt;EM&gt;&lt;STRONG&gt;this.containerNode&lt;/STRONG&gt;&lt;/EM&gt;) already exists and so AlfSearchResult renders correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I stop at the same line when the page loads, &lt;EM&gt;&lt;STRONG&gt;this.containerNode&lt;/STRONG&gt;&lt;/EM&gt; targets the same DOM element from before, but this time the DOM element doesn't exists in document yet. That's why it can't render the results when the page loads.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The DOM element in question is a div element from the parent widget (AlfSearchList) but from some reason isn't rendered yet. I'm still trying to figure out how to solve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2016 14:11:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/aikau-alfsearchresult-bad-behavior/m-p/279907#M233037</guid>
      <dc:creator>nilsonmorais</dc:creator>
      <dc:date>2016-10-26T14:11:57Z</dc:date>
    </item>
  </channel>
</rss>

