Hi,

As a big fan of the SAP HANA Cloud Platform WebIDE I use the SAPUI5 templates to start my projects. Most of the time this is based on OData services and I use the full wizard to gerenate my app. In some cases it happens that I cannot use the OData service to generate your SAPUI5. The OData services is not finished ,they are still working on the backend logic or for some other reason I just have to start without a service.

Thanks to all the templates of the SAP WebIDE I don’t have to start from scratch. There is a template “SAPUI5 Application Project” which gererates a basic setup to start with SAPUI5.

/wp-content/uploads/2015/10/temp1_817094.png

I used this template to have a quick start 🙂 It immediately generated a full project like in the next picture. Just to test if everything was working fine, I’ve added a label in the main view with a small dummy text.

/wp-content/uploads/2015/10/temp2_817095.png

I just added a label between the content tags:

/wp-content/uploads/2015/10/temp3_817096.png

Just to see if this already would work, I did a quick test of my generated SAPUI5 application with a dummy label.

Select the index.html page and click on run:

/wp-content/uploads/2015/10/temp4_817097.png

In my first test I could only see the title of my SAPUI5 app, but not my label with my dummy text!

/wp-content/uploads/2015/10/temp5_817098.png

After trying a few things, I came to the following solution. I added the following tags:

/wp-content/uploads/2015/10/temp6_817099.png

Testing this again gave me my SAPUI5 app with my dummy label 🙂

/wp-content/uploads/2015/10/temp7_817101.png

Hope this will help SAPUI5 developers that will use this template so they won’t lose too much time.

Kind regards,

Wouter

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Andreas Kunz

    Hi Wouter,

    thanks a lot for this blog post.

    It needs to be mentioned that these templates offered in WebIDE have a different history (creation time, content scope, maintenance intensity) and have been provided by different teams. The one you used probably has the following problem: a View control’s height is defined by its content and a Page control’s height is 100% of its parent height. Putting both into each other without making sure the View has a defined height leads to collapsing.

    Adding an App around fixs the issue because the App sets 100% height to itself and all parent nodes.

    From the templates listed, I know the following two: “SAPUI5 Master-Detail Application” and “SAPUI5 Worklist Application” and personally I can say that these two are up to the current coding guidelines, they are continuously developed further, and they are regularly tested. There are sometimes bugs, but they are usually recognized and fixed quickly, so I would say they have a certain level of quality that I would trust.

    This is not saying the others are not as good, I just don’t know them because they are developed elsewhere.

    I’ll see whether I can report this issue.

    Regards

    Andreas

    (0) 
    1. Wouter Lemaire Post author

      Hi Andreas,

      Thank you very much for your feedback and explanation! It explains a lot.

      Just wanted to share this so that other developers won’t use too much time when they start from this template.

      Kind regards,

      Wouter

      (0) 
  2. Naresh Kumar Malik

    Thanks Wouter

    this helped.. I was struggling  with this … this template was not working for me.

    I am not sure earlier the folder  structure was different for this template where we used to have view and controller under the Viewfolder. now we have webapp folder and separate folders for view and controller.

    anyways thanks a lot for this blog.

    (0) 
  3. Rachid Kaouass

    Hi,

    if you go in the Layout Editor mode, and you select the View1.view.xml in the Outline, then you will be able to set 100% height to the view.

    Regards,

    Rachid

    Screen Shot 2015-10-28 at 17.19.08.png

    (0) 

Leave a Reply