on 06-09-2006 1:18 PM
I am totaly new to webdynpro, kindly help.
I have a value node "A" and corresponding value attribute say "b", I would like to add elements to "b" at run time like "10,20,30,40" , and wants to bind these elements to table column.
Thx
Manoj
hi
check out this
context
|
!__valuenode------valueattt (int)
|
|
|
|
|
|---userinputvalueattribute (int) (bind it to inout field for getting values from user)
IPrivate<Viewname>.I<valuenode>Element x=wdContext.node<valuenode>().create<valuenode>Element();
wdContext.nodeG<valuenode>().addElement(x);
int val=wdContext.currentContextElement().get<userinputvalueattribute>();
x.setvalueattr(val);
hope this helps,
regards,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thx but how can i bind these elements to a table column.
I have table which is binded with a RFC output and i want to add one extra column to it and bind these value to that column.
When i use A.B in text properties of that column's text view i m getting same value in all rows.
my code is as follows.
IPrivateResults.IANode node =wdContext.nodeA();
IPrivateResults.IAElement elmt =null;
for(int i=0;i<5;i++)
{
elmt = wdContext.createAElement();
elmt.setB(10+i*10);
node.addElement(elmt);
}
Note : But when i am using a seprate table with-out binding with RFC output , i am getting correct values in all rows.
Make sure that singleton=false for node A.
Let "Data" be the table data source node (parent node of A). Then you can create an element of node A for table row at index i like this:
IDataElement row = wdContext.nodeData().getDataElementAt(i);
IAElement a = row.nodeA().createAndAddAElement();
a.setB(10*(i+1));
Armin
(I assume you mean adding elements with int values to node A and B be an integer attribute.)
wdDoInit():
for (int i = 10; i <= 40; i += 10)
{
IAElement a = wdContext.nodeA().createAndAddAElement();
a.setB(i);
}
At design time, bind some suitable property of the table cell editor of that column (e.g. TextView.text, InputField.value) to the context attribute "B".
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.