<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>[SOLVED]Item Selector button is disabled</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118266658" />
  <subtitle>[SOLVED]Item Selector button is disabled</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118266658</id>
  <updated>2026-04-04T05:49:30Z</updated>
  <dc:date>2026-04-04T05:49:30Z</dc:date>
  <entry>
    <title>RE: Item Selector button is disabled</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118270913" />
    <author>
      <name>Massimo Bevilacqua</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118270913</id>
    <updated>2020-01-14T07:52:44Z</updated>
    <published>2020-01-14T07:52:44Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi Andrew,&lt;br&gt;thank for the reply.&lt;br&gt;&lt;br&gt;In th end I have found the problem.&lt;br&gt;&lt;br&gt;In the tutorial there is in the java part:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;PortletURL itemSelectorURL = _itemSelector.getItemSelectorURL(
    requestBackedPortletURLFactory, "sampleTestSelectItem",
    imageItemSelectorCriterion);&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;    &lt;br&gt;    and in the JSP code:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;aui:script use="liferay-item-selector-dialog"&amp;gt;

    $('#&amp;lt;portlet:namespace /&amp;gt;chooseImage').on(
        'click', 
        function(event) {
            var itemSelectorDialog = new A.LiferayItemSelectorDialog(  
                {
                    eventName: 'ItemSelectedEventName',
                    on: {...&amp;lt;/aui:script&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;                    &lt;br&gt;The event name must be the same written in the java code, in this example "sampleTestSelectItem" and not "ItemSelectedEventName". Using the same name in both it works.&lt;br&gt;&lt;br&gt;I always found Liferay tutorials and documentation very confusing&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Massimo Bevilacqua</dc:creator>
    <dc:date>2020-01-14T07:52:44Z</dc:date>
  </entry>
  <entry>
    <title>RE: Item Selector button is disabled</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118271849" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118271849</id>
    <updated>2020-01-13T18:27:44Z</updated>
    <published>2020-01-13T18:27:44Z</published>
    <summary type="html">Hey Massimo,&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t have a lot of experience with the item selector stuff (just haven&amp;#39;t gotten around to it yet) but I am happy to troubleshoot with you. Can you share some code? and maybe shed some light on some of the &amp;#34;adjustments&amp;#34; you made to make it work? &lt;br /&gt;&lt;br /&gt;My first thought as to why the button is disabled is, of course, permissions related -- but that&amp;#39;s just a stab in the dark.</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2020-01-13T18:27:44Z</dc:date>
  </entry>
  <entry>
    <title>[SOLVED]Item Selector button is disabled</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118266657" />
    <author>
      <name>Massimo Bevilacqua</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118266657</id>
    <updated>2020-01-13T16:27:17Z</updated>
    <published>2020-01-13T16:27:17Z</published>
    <summary type="html">I have followed the tutorial in this page about Item Selector&lt;br /&gt;&lt;a href="https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/selecting-entities-using-the-item-selector"&gt;https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/selecting-entities-using-the-item-selector&lt;/a&gt;&lt;br /&gt;&lt;a href="https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/selecting-entities-using-the-item-selector"&gt;&lt;/a&gt;&lt;br /&gt;After some adjustment it works, but now I have a problem, the &amp;#34;add&amp;#34; button inside the Item selector is disabled and the code inside the &amp;#34;selectedItemChange&amp;#34; function is never called.&lt;br /&gt;&lt;br /&gt;I just need to select a file and the get the name(or title) of the file. &lt;br /&gt;Someone knows how to do it?</summary>
    <dc:creator>Massimo Bevilacqua</dc:creator>
    <dc:date>2020-01-13T16:27:17Z</dc:date>
  </entry>
</feed>
