cancel
Showing results for 
Search instead for 
Did you mean: 

Modify Cqn expand

Violina
Newcomer
0 Kudos

Hello Experts!

I have following use-case. I should use an expanded entity for my Fiori Elements Object Page. If I write the header annotations for the OP like:

HeaderInfo     : {
            $Type         : 'UI.HeaderInfoType',
            Title         : {Value: EXPANDED_ENTITY.key},
},

the url is correctly formed like: /MAIN_ENTITY?&expand=EXPANDED_ENTITY. But as my association is 1:n, the OP cannot determine which title to use and is showing (Unnamed Object). So I was wondering if I can keep the annotations simple and use as title the same property from my MAIN_ENTITY, but somehow add the expand to the EXPANDED_ENTITY in the following method in my read handler:

private CqnSelect modifyQuery(CqnSelect cqn) {
        return CQL.copy(cqn, new Modifier() {
            @Override
            public CqnSelectListItem expand(CqnExpand expand) {
                return ...;
            }
        });
    }

Can you give me an advise if it is possible, and if yes can you give me some ideas how to achieve it, as I'm struggling to add anything to the CqnExpand.

Accepted Solutions (0)

Answers (0)