on 01-18-2008 1:01 PM
Hi,
I need to populate values in a table which i got from the bean...
i have retrived the values in Class[] and if i populate the table (as in code below).. i get only the first record..
i have created a value node (GroupNode) in the view context and iam binding the values to it from my Java Command Bean (CategoryBean)..
The code is as follows..
GroupDTO[] groupDTOs = wdContext.currentCategoryBeanElement().modelObject().RetSameCatidObj();
// Collection groupList = new ArrayList();
for(int i=0;i<groupDTOs.length;i++){
groupList.add(groupDTOs<i>);
IPrivateDel_sda.IGroupNodeElement ele = wdContext.createGroupNodeElement();
ele.setCategoryid(groupDTOs<i>.getCategoryid());
ele.setGroupid(groupDTOs<i>.getGroupid());
wdContext.nodeGroupNode().bind(ele);
}
Is there any workaround to solve the issue...
Thanx.
Shravan.
Hi,
I got it resolved by binding the table to a newly created node with all attributes as b4... nw it worked ,,,...
thanx for all ur replies ..
thanx 4 ur time..
Shravan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Instead of statement
wdContext.nodeGroupNode().bind(ele);
please use
wdContext.nodeGroupNode().addElement(ele);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Replace
wdContext.nodeGroupNode().bind(ele);
by
wdContext.nodeGroupNode().addElement(ele);
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this my code which gives first record in the table
wdContext.currentCategoryBeanElement().modelObject().setCategoryid(wdContext.currentGroupbeanElement().getCategoryid());
GroupDTO[] groupDTOs = wdContext.currentCategoryBeanElement().modelObject().RetSameCatidObj();
for (int j = 0; j < groupDTOs.length; j++)
{
IPrivateDel_sda.IGroupNodeElement ele = wdContext.createGroupNodeElement();
ele.setCategoryid(groupDTOs[j].getCategoryid());
ele.setGroupid(groupDTOs[j].getGroupid());
wdContext.nodeGroupNode().addElement(ele);
}
thnxs 4 ur reply
shravan
Edited by: Armin Reichert on Jan 19, 2008 12:15 PM
You are confusing me. First, you said that the array from which you fill the node contains 6 entries, then you say the node contains 2 elements and the table shows one entry?
Please check again:
- How many entries has the array from which you fill the node.
- How many elements contains the node after the loop?
- How did you bind the table against the node?
- Did you invalidate the result node after executing the backend call?
Armin
Hi,
My Node has 6 elements but iam populating only 2 elements (groupid and category id) to the table..
So number of node elements is 6 only when i debugged...
1) Array has 6 elements..it has only 2 records in db against it...
2) 6 Elements after the loop..
3) i have created a value node and i bound that view context value node to the table..
4) I am using EJBs to get the values from database...
thanx.
Shravan.
If we do not use the same language we will have trouble in communication.
In Web Dynpro we talk about context nodes, attributes and node elements.
You say "My node has 6 elements". What does that mean, 6 attributes or 6 node elements?
"Array has 6 elements, it has only 2 recors in db against it". I don't understand this sentence.
Please clarify.
Armin
Hi,
Sorry for not following the conventions...
My node has 6 attributes to it...
The array has 2 entries
[0] ={ grpid = "user 1" , gname ="gname1" , catid= "cat1",status="current",lastupdate = "18/1/08",updatedby = "user1"}
[1] ={ grpid = "user 2" , gname ="gname2" , catid= "cat2",status="current",lastupdate = "18/1/08",updatedby = "user1"}
Thanx.
Shravan.
Hi,
The code which i posted before is the code i wrote in onactionshow method of a button...
I thought this is sufficient to populate the table as i have bound the values to the context...
Is there any more to populate the values in table...
Actually iam new to this java developement, as i am a abap developer by prof..
Thanx.
Shravan.
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.