I got a cuba-entity-form for the RequestJoin entity.
Here is my portal-request-join-edit.html with the code inside it.
This is the screen of that html
So the problem is in the power field. When i put the value there, it doesn’t save in database.
However, the “Successfully saved” message appears. Meanwhile, there log in tomcat
Entity portal$RequestJoin doesn’t contain a ‘_instanceName’ property
Entity portal$Customer doesn’t contain a ‘_instanceName’ property
This is requestJoin-edit-view
So the question is how can i create nested object and than put the value in nested field?
Sorry for my English.
Maybe this is an obvious issue but i’m a junior
Hi, Vlad. Thank you for the answer
I tried your suggestion, but i did something wrong. It still doesn’t create new Customer and doesn’t save the value for the power field.
Also, my enumerators(reason, consumption) doesn’t load anymore.
I tried load them using this.app.loadEnums but unsuccessfully.
How should i initialize nested custom and enums(reason, consumption)?
Vlad, your solution was really helpful. I understand a lot. Thank you very much.
I just create new html and implement all the things as in your sample, push it directly to the menu and it works.
It creates nested customer and saves values.
But actually, I create Polymer UI screens using cuba-studio. They are not so easy
I mean i click Polimer UI → New → Entity-Management → Select appropriate views and finally tap on ‘Create’ button.
Then studio creates three html: edit, list, management.
And then i do all the same staff for edit-page:
write
createCustomer() {
customer: {}
}
in edit.html
It doesn’t work. I suppose i should do something in management.html, because edit-page calls from it.
But i don’t know what exactly.
Here they are https://cloud.mail.ru/public/Jovm/WbqRsRjNN
Maybe you could make sample about nested object with entity-management functionality?
I will be so gratefull
In order to initialize customer in -edit component you should bear in mind that it could be loaded (via cuba-entity). You can initialize customer sub-property using Polymer’s observer e.g.: