on 10-04-2007 9:29 AM
Dear all,
I am having a table ( with declaration of 5 rows during the init ) there's a next button which will add another 5 rows by pressing. Let say the user ony key in 7 rows of data.. how should i track it? coz these data act as input to my bapi function. One of the input field of my bapi is to state how many rows of data that a user had key in. Thank you.
Hi
wdContext.nodeYourNodeName().size(); will return no of rows
Regards
Abhijith YS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi all,thx for the fast reply. but at the init do there i haf the following declaration
for (int i = 0; i < 5; i++) {
IPrivateWoInvNum.ITableElement tab =
wdContext.nodeTable().createTableElement();
wdContext.nodeTable().addElement(tab);
}
so it means no matter wat,the row size is set to 5..but i wish to check the exact number of records..coz user might juz key in 1 row or up to 3 rows... any ideas? thanks
I think ur problem is empty records, u dont want to process empty table rows.
m I right?
if yes then just before processing the data / records, check for empty records and remove unwanted rows from the node.
for (int i = 0; i < TableNode.size(); i++)
{
if all cells of row(i) are empty
remove row(i) from Table Node.
}
OR if you dont want to remove empty rows from display (screen), then at the time of processing, transfer useful rows to a separate node and process that node.
Best Regards
Deepak
Hi Joan,
You have intially added 5 rows to the table in WDDoInit() method but whenever you keep on appending the rows to the table(ie. whenever a nodeElement is added to the node), the wdContext.nodeTable().size() will give you the number of rows at that stage of time.
Assume 5 rows are added intially and on click on some button you added 2 more rows . Now say there is a button called count which calculates the number of the rows in your table. So you can read the size of your node on the action binded to the button count
wdComponentAPI.getMessageManager().reportSuccess(wdContext.nodeTable().size()+"");
Regards,
Murtuza
Hi Joan,
You might have binded a node as a datasource for your table. You can get the number of rows in your table by reading the size of the node.
Assume, the name of your node is Table()
int size = wdContext.nodeTable().size();
Warm Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.