Skip to Content

Create ListItem from the controller, SAPUI5

Hi,experts

I'm trying to create a sap.ui.core.ListItem control and then add it to a select control in the view from the controller.

I have already done this process with a gridtable, but how can I do it with a Listitem?

Greetings from Colombia.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 14, 2020 at 05:25 AM

    Hi Andres,

    You shouldn't create your views inside your controller. You should adhere to the MVC paradigm, hence why sapui5 code snippets provided below is always using MCV:

    https://sapui5.hana.ondemand.com/#/entity/sap.m.SelectList/sample/sap.m.sample.SelectList/code/Page.controller.js

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.