cancel
Showing results for 
Search instead for 
Did you mean: 

FIORI Elements List Report Text in edit/draft mode

pmcfarling
Participant

Cannot seem to figure out how to display the text from @ObjectModel.text.element:['textName'] when in draft/edit mode. The key is a UUID and very ugly. We've tried setting the textInEditModeSource property to "NavigationProperty" via controller extension ( using VSCode/FIORI Tools). Even loaded the application in WebIDE and setting it there using the UI5 Visual Editor but no luck.

gregorw
Active Contributor
0 Kudos

Hi Paul, Hi vinod.snair ,

I think I face the same issue. I've filed the incident:

393237 / 2021 UUID shown in edit/draft mode

with detailed instructions how you can replicate the issue with my sample CAp app bookshop-demo. I have a V4:

http://localhost:4004/webapp/fiori-latest.html#V4UsersUI5latest-manage

and a V2:

http://localhost:4004/webapp/fiori-latest.html#UsersUI5latest-manage

to replicate the issue.

Best regards
Gregor

Accepted Solutions (0)

Answers (5)

Answers (5)

marcmaurí
Participant

Hi pmcfarling and gregorw ,

I was struggling with value lists last week and I got really weird behaviors.

Gregor, I don't know if it would be the best option, but in your sample you can solve it by adding the following annotation:

annotate AdminService.Employee with {
 ID
 @Common.Text: { $value:email, @UI.TextArrangement: #TextOnly };
}

Then, in edit mode you got: (see attachment)

Note that in that case, #TextOnly / #TextLast /... produces the same result (I guess it is due to the Hidden annotation of the ID property).

Best regards,

Marc

gregorw
Active Contributor
0 Kudos

Thank you Marc. That works great in V2 and also V4. Now only the issue exists that V4 doesn't update the other fields when a new Employee is selected. V2 does.

marcmaurí
Participant

Hi gregorw ,

as I got from the FE Tools team in the beta program, the implemented side effects in V2 and V4 are not equivalent.

For the V4 you need to add the following side effect annotation:

annotate AdminService.Users with @(  
  Common.SideEffects #employeeChange : {
    SourceProperties : [employee_ID],
    TargetEntities   : [employee]
  }
);

Best regards,

Marc

gregorw
Active Contributor
0 Kudos

Hi Marc,

thank you for sharing. Works like a charm. Is that already documented

Best regards
Gregor

former_member479349
Discoverer
0 Kudos

Hi Colleagues,

Can we hide the guid value from appearing in the List report table? I have a ValueHelp dialog inside a list in the Object page. On selecting a value in edit/create mode the guid gets visible. On saving the text is getting visible (which is expected). I have properly annotated the associated entity with UI.TextArrangement but still the guid is getting visible.

vinod_snair
Participant
0 Kudos

Hi Paul,

Meanwhile I also found the documentation link from Whats New of UI5 version 1.84 which describe the details here. Please refer to the same.

Regards,

Vinod

vinod_snair
Participant
0 Kudos

Hi Paul,

It will work in UI5 version 1.87. I would request you to remove the controller extension code which overrides and set the textInEditModeSource property as well as the UI change which tries to do the same before your test. In case it doesn't work please provide an example of your metadata, annotation and we can check what is the issue

Regards,

Vinod

pmcfarling
Participant
0 Kudos

I can’t use 1.84 or 1.87.

vinod_snair
Participant
0 Kudos

Hello Paul,

Which version of UI5 are you using. I would expect this to work in UI version 1.84 and above automatically for Fiori elements application if you have the annotations done correctly (Associated ValueHelpEntitySet with correct TextArrangement configuration).

Regards,

Vinod

pmcfarling
Participant
0 Kudos

This is on a 1909 system so I believe it’s 1.71. I believe we’re on patch level 30(on my phone at the moment). I did try using the latest UI5 version (1.87i think) on WebIDE without success. I tried with the the CDS annotation @ObjectModel.text.element and also using local annotations using Common.Text with a path attribute set to the text field. I can convert it to @ObjectModel.text.association of that would work? I also noticed the note that textInEditModeSource=NavigationProperty was experimental until 1.84. Any help is appreciated.