Skip to Content

SAPUI5 Data Binding to a SimpleForm

I am having issues trying to bind data to a simple form. I am using a mock server and have successfully bind data to a list/table

My manifest.json looks like this

"mock": {

"dataSource": "mainService"

}

My mockdata(UserDetailsSet.json) looks like this

[{ "ID_PassNum": "cu001",

"Title": "Mr",

"Name": "Don",

"Surname": "Ownery",

"ResType": "SA",

"Country": "South Africa"

}]

My SimpleForm fields looks like this

<Input value="{mock>/UserDetailsSet/0/Name}" />

<Input value="{mock>/UserDetailsSet/0/Surname}"/>

I have also tried this

<Input value="{mock>/UserDetailsSet/('00001')/Name}" />

<Input value="{mock>/UserDetailsSet/('00001')/Surname}"/>

What am I missing?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Aug 21, 2016 at 04:13 PM

    check what the model looks like in dev tool

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 22, 2016 at 10:42 AM

    Hi Timothy,

    Try this one

    <Input value="{mock>/UserDetailsSet/Name}"/>

    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.