cancel
Showing results for 
Search instead for 
Did you mean: 

Custom FPM Page is not displaying UI correctly

arunmbarec
Participant

I am following the tutorial from marius.freitag. I was able to work through the scenario. I tried to extend few functionality of my own. I Added an association table for the passengers and using macro table I tried to display them as child table in the Object Page view. I got the wrong table rendered. Then i commented the macro table code from the view, but when i execute the application i still see the table. I tried refreshing the application multiple times and i still see them.

View: I have commented the code for the macros table.

In the application, i see the passenger tables instead of the associated entry.


Annotation i have added hoping to get the association displayed in the UI:

The code i have written is available in the git hub repository for your reference.

https://github.com/arunkrishnamoorthy/cap-fe-passengers.git/

How do i clear the cache? Also sometimes i have noticed that the code i have written in the TS files are skipped during execution. Though i see the code in the developer tools while doing line by line execution, the code execution jumps without executing the line.

Thanks & Regards,
Arun K

Accepted Solutions (1)

Accepted Solutions (1)

mariusfreitag
Product and Topic Expert
Product and Topic Expert

Hi Arun,

Thanks for posting this question! It tried out your repository and I think your issues is two-fold:

1. As you identified correctly, there is some caching preventing you from refreshing the implementation properly. To disable this, you can try to add the URL parameter sap-ui-xx-viewCache=false (i.e. http://localhost:4004/com.fe.fpm.maintainpassengersfpm/index.html?sap-ui-xx-viewCache=false), and disable the cache in the dev tools of your browser.
2. You are trying to display a table for a to-one association (to_Address: Association to PassengerAddress), which does not work. You could change this to a to-many association (to_Address: Association to many PassengerAddress), and also change the corresponding demo data, or use another visualization for the data.

Please let me know if you have more issues.

Best
Marius

arunmbarec
Participant
0 Kudos

Hi Marius,

Thanks for your response. I will try it out and update you.

Also please see if you can have a look at the following questions. when using macros, from association api, when i try to click on create new entries with editflow api, it does not work always. when i refresh the page and click on create then it is working.

what is the correct way of handling the switch between active and draft entity while using FPM.

https://answers.sap.com/questions/13999446/handling-of-createupdatedelete-from-associationchi.html?c...

https://github.com/SAP/openui5/issues/3886

Regards,
Arun K

mariusfreitag
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Arun,

I can see that Nicolas Lunet already started to support you here. If you provide him with the code sample, he will probably be able to check further. As he already started looking at this, I think it doesn't make sense for me to also check at this point in time.

Do let me know if anything else is open after you came back to him!

Best regards
Marius

arunmbarec
Participant
0 Kudos

Hi Marius,

This still isn't working for me. I have commented all the code for the macros in the view.

Still when i run the application, i see the forms and table.

Regards,

Arun K

mariusfreitag
Product and Topic Expert
Product and Topic Expert
Hi Arun,
Can you try to add the parameter before the hashtag?For example,
http://localhost:4004/com.fe.fpm.maintainpassengersfpm/index.html?sap-ui-xx-viewCache=false#/Passengers('000002')Best
Marius
arunmbarec
Participant
0 Kudos

Thanks Marius. Adding the parameter before the hashtag worked.

arunmbarec
Participant
0 Kudos

Hi Marius,

I understand may be nicholas might take a look and give me an solution. I am sharing the git with you as well. Take a look and guide me if you have time. Please find the git repository. In the issues tab, i have tried to explain the issue in detail, please take a look and let me know if this feature is supported in the FPM. Using the createDocument of the editFlow is navigation to the new view, and the inline seems to be only working with the macros table. i don't want either of them as i am trying to build a custom panel layout which displays each item on the same screen hence in this example i have given an responsive table.

https://github.com/arunkrishnamoorthy/cap-draft-enabled/issues/2

Regards,

Arun K

mariusfreitag
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Arun,

I just checked and saw that you are using a sap.m.Table rather than the Table building block. Is there a reason for this?

You could try adding a LineItem annotation for the Booking entity; something like the following:

annotate service.Booking with @( 
UI.LineItem: [
{
$Type: 'UI.DataField',
Value: BookingDate
},
{
$Type: 'UI.DataField',
Value: ConnectionID
},
{
$Type: 'UI.DataField',
Value: FlightDate
},
{
$Type: 'UI.DataField',
Value: FlightPrice
}
]
)

and then adding the following to your view:

<macros:Table
metaPath="to_Booking@com.sap.vocabularies.UI.v1.LineItem"
id="idBookingTable" />

I typed these snippets in this editor so there might be small syntax issues, but I think the idea comes across.

Let me know if that doesn't help.

Best
Marius

arunmbarec
Participant
0 Kudos

Hi Marius,

I did not use the building block, because the actual thing i wanted to build is a custom layout where each row act as a card . to demonstrate that i used the sap.m.Table. When i used the macros table the option to create a new item inline worked fine.

I got some help from a sap colleague. Adding $$ownRequest sort of solved the issue for me. I updated the code in my GitHub

. https://github.com/arunkrishnamoorthy/cap-draft-enabled/issues/2

<Table
                id="idBookingTable"
                items="{
                    parameters : {
                        $$ownRequest : true
                    },
                    path: 'to_Booking'
                }"
            >   
mariusfreitag
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks for taking the time to reply and presenting your solution!

Best
Marius

Answers (0)