Skip to Content

SAPUI5: A table in a popover (must have a title)

I have a popover like this:

The corresponding code uses a table:

<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:l="sap.ui.layout">
	<ResponsivePopover id="SankeyPopver" title="{i18n>Selection.Label.Title}" class="PopOver" placement="Bottom">
			<Button text="{i18n>Selection.Button.CreateGroup}" 
			tooltip= "{i18n>Selection.Button.CreateGroup}" press="onCreateTG"/>
			<Button id="ShowKpiBtn" text= "{i18n>Selection.Button.ShowKPI}"
			tooltip= "{i18n>Selection.Button.ShowKPI}"
			<Table id="productsTable" width="25rem">
					<Column hAlign="Begin" id="productCol" width=""><Text text="{i18n>Selection.Label.Source}"/></Column>
					<Column hAlign="End" id="supplierCol" minScreenWidth="Tablet" demandPopin="true"><Text text="{i18n>Selection.Label.Journeys}"/></Column>
					<Column hAlign="End" id="dimensionsCol" minScreenWidth="Tablet" demandPopin="true"><Text text="{i18n>Selection.Label.UniqueCustomers}"/></Column>
							<!--<ObjectIdentifier  text="Identifier" class="sapMTableContentMargin"/>-->
							<Text text="{i18n>Selection.Label.OneItem}"/>
							<Text text="{/pathItemCount}"/>
							<Text text="{/contactCount}"/>

The Web IDE has a warning: "A table must define a custom header with a title element within"

So I am wondering should we use a table in this case? If I change to other tag instead of table, do I need to change any other file beside the fragment.xml file?

Thank you!

selection.png (10.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 19 at 05:24 PM

    Hi Jerry Zhang,

    This is expected if you have Fiori XML validations selected in the project settings. There are a list of validations that will trigger if you select the Fiori XML

    This will not come if you put a toolbar in the headerToolbar aggregation of the table and have a title inside the toolbar. But you will get two titles. Instead you can ignore that message as this will not cause any issue (It's just an information message).

    For your use case, I believe the tableSelectDialog is the best choice. For this it will have a tile, search and stuff..



    Add comment
    10|10000 characters needed characters exceeded