on 08-17-2005 11:38 AM
Hi, all!
I've got the following problem: I'm implementing a clientsurvey and therefore creating the UI-elements for answering questions (TextEdits, RadioButtons and CheckBoxes) dynamically.
I now have to save all the answers in a node-collection: I create a node-element for each TextEdit- and RadioButton-answer as well as one for all CheckBox-answers of each question.
How do I bind the TextEdit respectivly the checked- and keyToSelect-properties to the corresponding element in the node-collection?
Additionally: Has anybody had a similar problem to solve and therefore any better ideas?
Any comments are more than appreciated!
Regards,
Thomas
Can you give more details?
- Why do you need to create UI elements dynamically?
- Is the context (structure) created at design time?
Concerning data binding: You never bind UI element properties to node <b>elements</b> but always to nodes or attributes.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Armin!
Thanks a lot for your answer!
I have to display a - at design time - unknown number of questions and answers in one view. Questions could either require a textual input (TextEdit) or a single/multiple choice (RadioButtons or CheckBoxes) as an answer, which is also unknown at design time.
Questions and answer-posibilities (text, ids a.s.o.) are being retrieved via Adaptive RFC out of R/3, their context structure is created at design time. I also created a structure for saving the given answers (questionId, answerId, text, checked) at design time, so I only have created one node-element for each answer.
And concerning data binding: You're of course right, I sometimes just mix up the many different new expressions!
Regards,
Thomas
OK, now I see things clearer.
If possible, I would recommend using a table UI element. A table makes editing the data (node elements) in a context node easy: Each row represents a node element.
Unfortunately, the NW04 table doesn't support the multi-line TextEdit as a cell editor. At least, displaying multi-line texts is possible using TextView (with wrapping=true).
If you do not need editing inside the table, you could provide a display-only table together with an input area for editing the "current" question. Then you could use the normal data binding for a table.
Simulating the table and it's data binding is much more complicated and if possible, should be avoided.
Armin
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.