Reuse of existing uiComponent with different dataSourceMagento2 UI-Component listing datasource other than DBMagento2 : How to enable inline edit in catalog grid without changing source code?HOW TO PROVIDE DataSource To UiComponent <DynamicRows>Submit Form Button uiComponent Magento2Magento 2 uiComponent view modelProblem with checkbox uicomponent, has value doesnt 'check'Multiple datasource define in di.xml magento2Magento 2: Uicomponent grid filter with multiple values as paramsSubmit Button in UIComponentCustom Ui DynamicRows component not pulling in data

Groups where no elements commute except for the trivial cases

As a supervisor, what feedback would you expect from a PhD who quits?

What is the fundamental difference between catching whales and hunting other animals?

Who goes first? Person disembarking bus or the bicycle?

How to deal with a Murder Hobo Paladin?

Any way to meet code with 40.7% or 40.44% conduit fill?

Passwordless authentication - how invalidate login code

Howto display unicode character u2026 in terminal mode in emacs

Why do most airliners have underwing engines, while business jets have rear-mounted engines?

How to reclaim personal item I've lent to the office without burning bridges?

How did the IEC decide to create kibibytes?

Legendre's relation for Elliptic Functions not satisfied in Mathematica?

Why do Martians have to wear space helmets?

Can a USB hub be used to access a drive from two devices?

C++ compiler does not check if a method exists in template class

What is the shape of the upper boundary of water hitting a screen?

Why do we need a bootloader separate from our application program in microcontrollers?

Why do Klingons use cloaking devices?

Why is there paternal, for fatherly, fraternal, for brotherly, but no similar word for sons?

How do I talk to my wife about unrealistic expectations?

How to play a D major chord lower than the open E major chord on guitar?

How to factor a fourth degree polynomial

How did Einstein know the speed of light was constant?

Tiny URL creator



Reuse of existing uiComponent with different dataSource


Magento2 UI-Component listing datasource other than DBMagento2 : How to enable inline edit in catalog grid without changing source code?HOW TO PROVIDE DataSource To UiComponent <DynamicRows>Submit Form Button uiComponent Magento2Magento 2 uiComponent view modelProblem with checkbox uicomponent, has value doesnt 'check'Multiple datasource define in di.xml magento2Magento 2: Uicomponent grid filter with multiple values as paramsSubmit Button in UIComponentCustom Ui DynamicRows component not pulling in data






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I utilize the insertListing uiComponent based on a mandatory listing (grid) component in my own component. I want to reuse the listing for the insertListing but need to change it's dataSource to keep the grids data (selectionsProvider) seperatly. There seems no way to make use of the main component's namespaces in that case, since the namespace is set in insertListing's XML.



 <insertListing name="customer_address_listing" component="Magento_Customer/js/form/components/insert-listing">
<settings>
...
<externalProvider>customer_address_listing.customer_address_listing_data_source</externalProvider>
<selectionsProvider>customer_address_listing.customer_address_listing.customer_address_listing_columns.ids</selectionsProvider>
<ns>customer_address_listing</ns>
...
</imports>
</settings>
</insertListing>


You can see that it's possible to configure externalProvider (data_source) or selectionsProvider (ids). But this has to be configured in the listings XML file



 <item name="provider" xsi:type="string">customer_address_listing.customer_address_listing_data_source</item>


I want to use another dataSource without the need to create a whole new component for it.



Of course I already tried to add the dataSource via my module's etc/di.xml. But this didn't work.



Is there a way to achive this or am I on the completely wrong track?










share|improve this question




























    1















    I utilize the insertListing uiComponent based on a mandatory listing (grid) component in my own component. I want to reuse the listing for the insertListing but need to change it's dataSource to keep the grids data (selectionsProvider) seperatly. There seems no way to make use of the main component's namespaces in that case, since the namespace is set in insertListing's XML.



     <insertListing name="customer_address_listing" component="Magento_Customer/js/form/components/insert-listing">
    <settings>
    ...
    <externalProvider>customer_address_listing.customer_address_listing_data_source</externalProvider>
    <selectionsProvider>customer_address_listing.customer_address_listing.customer_address_listing_columns.ids</selectionsProvider>
    <ns>customer_address_listing</ns>
    ...
    </imports>
    </settings>
    </insertListing>


    You can see that it's possible to configure externalProvider (data_source) or selectionsProvider (ids). But this has to be configured in the listings XML file



     <item name="provider" xsi:type="string">customer_address_listing.customer_address_listing_data_source</item>


    I want to use another dataSource without the need to create a whole new component for it.



    Of course I already tried to add the dataSource via my module's etc/di.xml. But this didn't work.



    Is there a way to achive this or am I on the completely wrong track?










    share|improve this question
























      1












      1








      1








      I utilize the insertListing uiComponent based on a mandatory listing (grid) component in my own component. I want to reuse the listing for the insertListing but need to change it's dataSource to keep the grids data (selectionsProvider) seperatly. There seems no way to make use of the main component's namespaces in that case, since the namespace is set in insertListing's XML.



       <insertListing name="customer_address_listing" component="Magento_Customer/js/form/components/insert-listing">
      <settings>
      ...
      <externalProvider>customer_address_listing.customer_address_listing_data_source</externalProvider>
      <selectionsProvider>customer_address_listing.customer_address_listing.customer_address_listing_columns.ids</selectionsProvider>
      <ns>customer_address_listing</ns>
      ...
      </imports>
      </settings>
      </insertListing>


      You can see that it's possible to configure externalProvider (data_source) or selectionsProvider (ids). But this has to be configured in the listings XML file



       <item name="provider" xsi:type="string">customer_address_listing.customer_address_listing_data_source</item>


      I want to use another dataSource without the need to create a whole new component for it.



      Of course I already tried to add the dataSource via my module's etc/di.xml. But this didn't work.



      Is there a way to achive this or am I on the completely wrong track?










      share|improve this question














      I utilize the insertListing uiComponent based on a mandatory listing (grid) component in my own component. I want to reuse the listing for the insertListing but need to change it's dataSource to keep the grids data (selectionsProvider) seperatly. There seems no way to make use of the main component's namespaces in that case, since the namespace is set in insertListing's XML.



       <insertListing name="customer_address_listing" component="Magento_Customer/js/form/components/insert-listing">
      <settings>
      ...
      <externalProvider>customer_address_listing.customer_address_listing_data_source</externalProvider>
      <selectionsProvider>customer_address_listing.customer_address_listing.customer_address_listing_columns.ids</selectionsProvider>
      <ns>customer_address_listing</ns>
      ...
      </imports>
      </settings>
      </insertListing>


      You can see that it's possible to configure externalProvider (data_source) or selectionsProvider (ids). But this has to be configured in the listings XML file



       <item name="provider" xsi:type="string">customer_address_listing.customer_address_listing_data_source</item>


      I want to use another dataSource without the need to create a whole new component for it.



      Of course I already tried to add the dataSource via my module's etc/di.xml. But this didn't work.



      Is there a way to achive this or am I on the completely wrong track?







      magento2 uicomponent






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 27 at 10:56









      NicolasNicolas

      3861 silver badge10 bronze badges




      3861 silver badge10 bronze badges




















          0






          active

          oldest

          votes














          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f279900%2freuse-of-existing-uicomponent-with-different-datasource%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f279900%2freuse-of-existing-uicomponent-with-different-datasource%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown