cancel
Showing results for 
Search instead for 
Did you mean: 

filter a relational attribute in backoffice editor area

0 Kudos

I have 2 item types, typeA1 and typeB1 which have one to many relationship between them as shown below:
<relations>
<relation code="A1B1ExampleRel" generate="false"
localized="false" autocreate="true">
<sourceElement qualifier="typeA1" type="typeA1"
cardinality="one">
<modifiers read="true" write="true" search="true"
optional="true" />
</sourceElement>
<targetElement qualifier="typeB1" type="typeB1"
cardinality="many">
<modifiers read="true" write="true" search="true"
optional="true" />
</targetElement>
</relation>

In my extensionbackoffice-backoffice-config.xml, i have the below config

<editorArea:editorArea
xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea">
<editorArea:tab name="hmc.tab.typea1.sap">
<editorArea:section name="hmc.section.typea1.sap">
<editorArea:attribute
xmlns="http://www.hybris.com/cockpitng/component/editorArea"
qualifier="typeA1Name" />
<editorArea:attribute
xmlns="http://www.hybris.com/cockpitng/component/editorArea"
qualifier="typeA1Description" />
<editorArea:attribute
xmlns="http://www.hybris.com/cockpitng/component/editorArea"
qualifier="typeB1" />
</editorArea:section>
</editorArea:tab>
</editorArea:editorArea>
</context>

:
This works exactly as expected and I do get all the values of typeB1 in typeA1 under editor area.

Now, the new requirement is that we have to create a new usergroup type ug1 which is a simple extension of usergroup as shown below:

<itemtype code="UG12" generate="true" autocreate="true" extends="UserGroup">
<description>Distribution list</description>
</itemtype>


Lets say UG12 is populated with values UGA12 and UGB12.

Now some values of typeB1 are allocated UGA12(as usergroup).

My requirement is to filter the values of typeB1 under editor area of type A1 such that only those values which have UGA12 as groups assigned whould be visible under typeB1.

Any suggestion will be really helpful.

I have already tried referenecedSearchCondition parameter on groups as well as availablevalueprovider parameter but it didn't help.

I am thinking of writing an renderer class but I am not sure if it will be helpfull as we are speaking about filtering a column thats only available based on one to many relation.

Thanks for your help in advance.

Accepted Solutions (0)

Answers (0)