cancel
Showing results for 
Search instead for 
Did you mean: 

Widget content invisible

Former Member
0 Kudos

Hello All,

I try to create an AppSite and a Widget, where I want to reference my SAPUI5 project.

I created a SAPUI5 Application Project and placed a simple Table object in it (sap.ui.table.Table). It works without problems when I go directly to its URL in the browser.

Then I created the AppSite, a widget and the widget specification file as described in the HANA Developer Documentation (page 257).

Widget Specification File:

<?xml version="1.0" encoding="UTF-8" ?>

<Module>

    <ModulePrefs title="TestWidget">

    </ModulePrefs>   

    <Content type="html" href="https://answers.sap.com/path/to/my/index.html"></Content>   

</Module>

When I start the AppSite in the browser and embed the newly created widget in it, only the static HTML content of the referenced SAPUI5 Application Project index.html is displayed in die widget window (e.g. "Hello World", but not the

dynamically created sap.ui.table.Table object.

Can you give me any hints what could be wrong?

Thanks

Christoph

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Christoph,

I am having the same problem. You could solve?

, you know how to solve this?

Regards,

Marlo Souza

Former Member
0 Kudos

I think you're using out of date documentation. This is currently on page 384 of the development guide.

The .xswidget format is like this:

widgette.xswidget:

{

"name" : "Widgette",

"specXMLURL" : "/path/widgette.xml" ,

"description": "",

"icon" : ""

}

widgette.xml:

<Module>

          <ModulePrefs title="Widgette">

                    <Require feature="sap-context"/>

          </ModulePrefs>

                    <Content type="html" href="https://answers.sap.com/path/widgette.html"></Content>

</Module>

widgette.html:

<!DOCTYPE html>

<html>

<head>

          <!-- HANA System Relative links -->

          <script id="sap-ui-bootstrap"

        src="/sap/ui5/1/resources/sap-ui-core.js"

        data-sap-ui-theme="sap_goldreflection"

        data-sap-ui-libs="sap.ui.core,sap.ui.commons,sap.viz,sap.ui.table"></script>

    <script src="/path/widgette.js" type="text/javascript"></script>

   

    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>

</head>

<body class="sapUiBody">

    <div id="widgette"></div>

</body>

</html>