Search code examples
javascriptsapui5

How to put button in SAPUI5 quickview?


I have a sapui5 QuickView, which looks something like this: enter image description here

    <QuickView id="quickView">
      <QuickViewPage pageId="PageId123">
        <QuickViewGroup>
        <QuickViewGroupElement label="Material" value="{Material}" type="{sap.m.QuickViewGroupElementType.text}"></QuickViewGroupElement>
        </QuickViewGroup>
       </QuickViewPage>
     </QuickView>

Now, I want to add a button in bottom of Quickview. Is it possible? I tried adding

<Button icon="sap-icon://action"> </<Button>

But this does not work somehow. Is there any way I can add button? Thanks in advance.


Solution

  • It's not possible.

    According to Fiori Design Guidelines

    The quick view is similar to a popover, but has a predefined structure, a fixed set of UI elements, and automatic UI rendering.

    (...)

    Do not use the quick view if:

    • You want to provide information in a way other than displaying it in groups.

    Basically this can be understood checking the Type of the following aggregations:

    Finally, class sap.m.QuickViewGroupElement is not a container that allows you to add controls (like a Button) inside it.

    So, you should use a Popover like in this sample from the documentation