on 11-09-2005 9:55 AM
Hello,
i want to make a small application that takes input value from the input field save it in the context and display it in a table.
The problem is that when i add a new data it is not added into context as a new data but the data stored in the context is overwritten and only one value is displayed in a table...
in the context i defined value node with value attribute and set the cardinality 1..n and selection 0..1
does anyone know what should i set to add new values in the context and then display them in a table?
Anyone can help?
Thanks!
Please post the code where you add the new element into the node.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok, i thought that there some possibility to add the value in the list "automaticly".
So..Ive mapped the input field tih context and it works fine.. so to test how to add new value i put following code in the method onActionGoToUser:
IPrivateWelcomeView.IDataElement myElement = wdContext.createDataElement();
myElement.setLastname("test");
wdContext.addElement(myElement);
but now im becoming error that "must not add elements to a Node of cardinality 0..1 or 1...1"
Thanks for help!
Hi Karol,
Cardinality is a property that defines how many elements(rows) a particular node(table) can have.
So change the Cardinality property of the node to 0..n in the Context. Just for your information it can be changed at the controller in which you first created the Node and not in the mapped controller nodes.
Regards,
Shubham
Hi Karol,
Sorry I missed something in your code
IPrivateWelcomeView.IDataElement myElement = wdContext.createDataElement();
myElement.setLastname("test");
wdContext.addElement(myElement);
Why are you adding the element to the root note?
You should add it to your node for which the Cardinality is 0..n
wdContext.node<YourNode>.addElement(myElement)
Regards,
Shubham
In the layout tab.
For each column create a TableCellEditor.
For each TableCellEditor in the text property select the node value attribute you want to map to that particular column.
Then during display populate the node value attribute.
You shoould be able to map all fields using this.
Regards,
Kshitij Agrawal
Hi,
It seems that you have to store all entered values in context.
Whenever you want to add new data into context you have to create new node element and bind it to context node.
It should automatically reflect in table if it is created from that node.
NEx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.