1

I created a custom EAV for my module. Now I want to show all the columns in my **ui_component** listing. But only the field from my **main** table can be displayed.

How do I get all the other field names? Do I have to join all of them separately or is there something I am missing.

In my InstallData i have:

$printingTableSetup->addAttribute(
        $printingTableEntity,
        'created_at',
        [
            'type' => 'datetime',
            'is_used_in_grid' => true,
            'visible' => true,
            'user_defined' => true,
            'adminhtml_only'=>1
        ]
    );

In the table eav_attribute, the attribute is created.

In my listing xml i have the following:

<column name="created_at">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="dataType" xsi:type="string">date</item>
                <item name="label" xsi:type="string" translate="true">Created At</item>
            </item>
        </argument>
    </column>

No data is shown in the column

  • you need to joins all the tables which you have created and query accordingly , then you can use other columns of EAV table in your mylisting.xml fie – Manthan Dave Dec 19 '17 at 8:09
  • So for every entity i got, like datetime, int varchar, text etc. i have to join them manually. Do is do this with the _initSelect method? – Johan Dec 19 '17 at 8:17
  • Yes with _initSelect Method – Manthan Dave Dec 19 '17 at 8:19
  • Oh my... i hoped that wasn't the case... But okay i will do that.. Do you have maybe a example of core where they also do this? It's a bit of a downer that it has to go like that. – Johan Dec 19 '17 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.