cancel
Showing results for 
Search instead for 
Did you mean: 

How to Enter multiple inputs at a time in Form or Table

Former Member
0 Kudos

Hi,

I have one doubt in Webdynpro with java. How to enter multiple inputs at a time?

For Exam My requirement is we will take employee details node under node empid, name, sal etc some attributes is here

Client asking like this enter multiple inputs at a time that data will saved in ECC System.

1. By using form how can enter enter multiple inputs at a time I donu2019t this so I will take table(here I will select input fileds). If any possible in form also tell me how I can enter multiple inputs at a time.

In table suppose 6 rows available So He will enter

empid, name, sal ,firstname, last Name

empid, name, sal ,firstname, last Name

empid, name, sal ,firstname, last Name

Like 6 time Click Submit. That data will save in ECC.

So I was taken table. But in that Table only first row will be editable. I want all 6 will editable that time he will put data in rows then click on submit.

How to editable these remaining rows? if u have any documents pls send me.

Regards

Vijay Kalluri

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Vijay,

To enter multiple inputs in a table and to make the other rows editable you have to provide that node with initial values.

by initial values I mean you have to make that much space in your table node.

For example the name of Node is yourNode & you have empid, name, sal ,firstname, last Name

attributes in that node, and you have to make 6 rows editable.

Then, simply write this code in you wdDoinit() method of your view controller.


IPrivateYourView.IYourNodeElement e ;
for(int i = 0 ; i < 6 ; i++ )
{
 e = wdContext.nodeYourNode().createYourNodeElement();
 e.setAttributeValue("empid" , "") ;
 e.setAttributeValue("name" , "") ;
 e.setAttributeValue("sal" ,  "") ;
 e.setAttributeValue("firstname" , "") ;
 e.setAttributeValue("lastname" , "") ;
  wdContext.nodeOverTimeEnty().addElement(e) ;
}

Change YourView with your view name & YourNode with your node name.

If you have any problem in doing this you can revert back.

Hope it helps!!

Warm Regards

Upendra Agrawal

Former Member
0 Kudos

Hi Vijay,

Adding to what Upendra has suggested, I dont think there is a real need of initialing the individual columns.

Only creation and addition of rows should suffice.

Regards,

Himanshu

Former Member
0 Kudos

Yes I agree with Himashu.

IPrivateYourView.IYourNodeElement e ;
for(int i = 0 ; i < 6 ; i++ )
{
  e = wdContext.nodeYourNode().createYourNodeElement();
  wdContext.nodeOverTimeEnty().addElement(e) ;
}

Warm Regards

Upendra Agrawal

Answers (0)