on 2014 May 07 4:15 PM
hi all,
one issue about creating dynamically a range of Input fields:
i have one sap.ui.layout.form.FormContainer.
at first i want to have one Input field in it. if this field is filled, i want to have a new one below, which is empty, and the cursor should be set to the new field.
so i know that there is an function addContent for the formcontainer, so i can listen to the changeEvent of the Input field, if this is filled i will add a new Input field.
at first: is this a good solution or is there any recommended way from SAP?
second: if i will implement it this way, how can i read the data from this "array" of input fields?
third: how can i set focus on input field in sapui5?
thanks for help!
Regards,
Alex
Request clarification before answering.
1) Solution sounds good to me
2) You can do it in multiple ways:
3) SAPUI5 SDK - Demo Kit From my experience element.focus() works just fine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Maksim,
thanks for your reply. only two points:
br Alex
Hi Alexander.
The approach doesn't sound robust. Say the user fills the input in field1, fileld2 will be created. Then the user fills input in filed2, field3 will be created. Now, what if the user deletes the input in field1 ?You have to do a manual validation of the fields in the end anyhow! For this, you can create all the fields initially and do validations of the fields in the end say when you click on submit button which is a simpler and most preferred way.
Regards
Sakthivel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
30 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.