on 07-11-2011 7:02 AM
Dear All ,
Can anybody please let meknow what is the difference between size and length of a node in webdynpro java
what is the code for finding a node that how many attributes it is holding in runtime
Thanks in advance.
Dear Krishnakk
You can call the SIZE() method of the NODES and LENGTH() method on ATTRIBUTES.
Like if you have node Employee and Employee_ID and Employee_Name are attibute under it. suppose you have already populated the node employee.
***what is the code for finding a node that how many attributes it is holding in runtime
You have to identified the which node will be called based on the user actions;
You can fin the size of the node to identify number of the rows holding at runtime. loop through for to find the attributes
IWDMessageManager messageManager = wdComponentAPI.getMessageManager();
if(wdContext.nodeEmployee.size() > 0)
{
//Print Node size
messageManager.reportSuccess("Size of the Node ::"+wdContext.nodeEmployee.size() );
for(int i=0; i<wdContext.nodeEmployee.size(); i++
{
//Print Length of the Attributes Employee ID and Name
messageManager.reportSuccess("Length of the Employee Name ::"+wdContext.nodeEmployee().getEmployeeElementAt(i).getEmployee_ID().length());
messageManager.reportSuccess("Length of the Employee ID ::"+wdContext.nodeEmployee().getEmployeeElementAt(i).getEmployee_Name().length());
}
}
Hope it will helps
Best Regards
Arun Jaiswal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The size of a context node is the number of elements stored in the node. I never heard the notion "length" of a context node. What do you mean with "how many attributes it is holding in runtime"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Go through this help of node properties.
http://help.sap.com/javadocs/NW04S/SPS09/wd/com/sap/tc/webdynpro/progmodel/api/IWDNode.html
code for finding a node that how many attributes it is holding in runtime
int size = wdContext.nodeName().size();
for(int i=0;i<size;i++)
{
//Display the node elements
wdComponentAPI.getMessageManager.reportSuccess(wdContext.nodeName().getNodeElementAt(i).getAttName());
}
Regards,
Saleem Mohammad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.