Search code examples
broadleaf-commerce

Show child attribute object list grid in admin


I'd like to show the order.customer.externalId attribute using admin's template. I've tried the following:

    <mo:overrideItem ceilingEntity="org.broadleafcommerce.core.order.domain.Order">
      <mo:field name="name">
        <mo:property name="readOnly" value="false"/>
      </mo:field>
      <mo:field name="customer.externalId">
        <mo:property name="gridOrder" value="3500"/>
        <mo:property name="prominent" value="true"/>
        <mo:property name="friendlyName" value="External ID"/>
      </mo:field>
    </mo:overrideItem>

but I have no success.

Did anybody get something like this running?


Solution

  • By default it looks like this is set to GRID_HIDDEN. Try re-setting it with this, and also turning excluded=false, since it's under an @AdminPresentationToOneLookup:

    <mo:overrideItem ceilingEntity="org.broadleafcommerce.core.order.domain.Order">
      <mo:field name="name">
    <mo:property name="readOnly" value="false"/>
      </mo:field>
      <mo:field name="customer.externalId">
        <mo:property name="gridOrder" value="3500"/>
        <mo:property name="prominent" value="true"/>
        <mo:property name="friendlyName" value="External ID"/>
        <mo:property name="visibility" value="NOT_SPECIFIED"/>
        <mo:property name="excluded" value="false"/>
      </mo:field>
    </mo:overrideItem>