on 11-22-2010 1:03 PM
Hi All.......
In my table (web dynpro for java ) i am able to enter the data in first row only , and i m not able to input data in other rows...how to enable that rows for inputting . Please provide the code for that and explain it elaborately..
Thanks
Hi,
Please check the cardinality and you have to create element for the node to have multiple rows.
Regards
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Since the cardinality is 1..n the first row is enabled. In order to enable all the rows, write this piece of code in the wdDoInit() of the view:
for(int i = 0; i < <number of rows required>; i++)
{
I<contextnode>Element object = wdContext().createAndAdd<contextnode>Element();
}
Regards,
Poojith MV
Hi,
Consider the node bound to the table is 'TableNode' and consider you are going to create 5 rows in the table,
for( int i = 0 ; i < = 5 ; i++) {
IPrivate<View name>.ITableNodeElement element = wdContext.nodeTableNode.createTableNodeElement();
wdContext.nodeTableNode().addElement(element);
}
This will create 5 rows in your table.
Regards
Saravanan K
Hi
my node name is ' table' and view name is ' TestView ' the code im writing is :
for( int i = 0 ; i <= 5 ; i++) {
IPrivate TestView.ItableElement element = wdContext.nodetable.createtableElement();
wdContext.nodetable().addElement(element);
}
and i m getting error on the dot ( , ) of second line i.e. after IPrivate TestView ...error is "syntax error on token"
Thanks
Hi,
have you created any instances of the data node of the table?
I think you have created a node of cardinality 1..n that's why you are getting only row for inputing data.
Add a button on the view and on action of that button create instance of the node like this
IWDNodeElement ele = wdContext.node<Node name>.createElement();
wdContext.node<Node name>.add(ele);
Regards
Ravindra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Moderator Message: Moved from the Web Dynpro ABAP to the Web Dynpro Java forum.
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 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.