Skip to Content
0
Dec 19, 2022 at 08:51 PM

FIori elements building blocks: Table does not show data

252 Views

Hi community,

I've been playing around with flexible programming model sample app below.

https://github.com/SAP-samples/fiori-elements-v4-cap-advanced/tree/fpmVideos/app/travel_processor/webapp/ext/view

Here, create page is replaced with a wizard page. I have added Booking table as the last step of the wizard.

I was able to enter data in the wizard.

image.png

In the review step, I wanted to show the same table in display mode. However, data entered in above step was not displayed.

image.png

My view source is below.

<mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns:macros="sap.fe.macros" xmlns:form="sap.ui.layout.form" id="review" controllerName="sap.fe.cap.travel.ext.view.TravelCreate" xmlns="sap.m">
    <NavContainer id="wizardNavContainer">
        <pages>
            <Page id="createTravelPage" title="Guided Travel Creation">
                <content>
                    <Wizard id="CreateTravelWizard" class="sapUiResponsivePadding--header sapUiResponsivePadding--content" complete="reviewTravel">
                        <WizardStep id="stepAgency" title="Agency" validated="true">
                            <VBox width="800px">      
                                <Text text="Select the agency. For additional information open the Internal Travel Guidelines." />
                                <Link text="Internal Travel Guidelines" href="abc" />   
                                <macros:Field metaPath="to_Agency_AgencyID" id="Category" />
                            </VBox>
                        </WizardStep>
                        <WizardStep id="stepDate" validated="true" title="Travel Dates" >
                            <macros:Form metaPath="@com.sap.vocabularies.UI.v1.FieldGroup#DateData" id="dateForm" />
                        </WizardStep>
                        <WizardStep id="stepGeneral" validated="true" title="Customer Information">
                            <macros:Form metaPath="@com.sap.vocabularies.UI.v1.FieldGroup#Customer" id="generalForm" />
                        </WizardStep>
                        <WizardStep id="stepPricing" validated="true" title="Pricing">
                            <macros:Form metaPath="@com.sap.vocabularies.UI.v1.FieldGroup#PriceData" id="priceForm" />
                        </WizardStep>
                        <!-- added -->
                        <WizardStep id="stepBooking" validated="true" title="Booking">
                            <macros:Table metaPath="to_Booking/@com.sap.vocabularies.UI.v1.PresentationVariant" id="bookingItems" />
                        </WizardStep>
                    </Wizard>
                </content>
                <footer>
                    <OverflowToolbar>
                        <ToolbarSpacer />
                        <Button id="cancelButton" text="Cancel" press="cancelDocument" />
                    </OverflowToolbar>
                </footer>
            </Page>
            <Page id="reviewPage" title="Review New Travel">
                <content>
                    <macros:Form readOnly="true" metaPath="@com.sap.vocabularies.UI.v1.FieldGroup#Review" id="reviewGeneral" />
                    <!-- added -->
                    <macros:Table readOnly="true" metaPath="to_Booking/@com.sap.vocabularies.UI.v1.PresentationVariant" id="reviewBookingItems" />
                    <MessageStrip class="sapUiSmallMarginBottom" type="Warning" text="By clicking on Create New Travel you accept you read and accept our internal travel guidelines." showIcon="true" />
                    <Button text="Create New Travel" press="createTravel" type="Emphasized" />
                </content>     
            </Page>
        </pages>
    </NavContainer>
</mvc:View>

I hope to find out why the table does not show data. Any inputs or suggestions are appreciated!Best regards,Mio Yasutake

Attachments

image.png (54.6 kB)
image.png (50.1 kB)
image.png (99.3 kB)