on 05-27-2006 3:26 PM
Hi all,
could anybody help me to solve my problem?
I have a method which takes "IAspect" as input parameter.
The method is like that---> PostData(IAspect aspect);
I have a table in webdynpro. I am fetching data from that table by using the following code
// Code..............
IPrivateXfrCompView.IBPDataElement bdele;
for(int i=0; i< wdContext.nodeBPData().size(); i++)
{
bdele = wdContext.nodeBPData().getBPDataElementAt(i);
}
Now I want to pass those data in to the above method
PostData(IAspect aspect). So, how can I do it?
Another one if the method takes AbstractList as input
parameter[PostData(AbstractList)] then how can I pass
the same data in the input parameter?
Thanks & Regards
Sudip
SUDIP,
Sadly, WD has a shortcoming here.
Actually, your IAspcet (that is java.util.Collection besides other things) serves as source for context node. However, WD does not provide any way to get this source (collection of model objects) back.
So you can do either of below:
1. If you may track where you <b>bind</b> collection to node, then use this collection.
2. If nodeBPData has parent model node (wdContext is not considered, while it is not a model node) then you may try to get collection as wdContext.current<ParentNodeName>Element().modelObject().getRelatedAspect("<relation-name>");
3. If you know that collection is not empty (wdContext.nodeBPData().size() > 0), then try:
final IAspectRow row = (IAspectRow)wdContext.nodeBPData().getBPDataElementAt(0).model();
final IAspect all_rows = row.getAspect();
Thought, [1] or [2] not always possible.
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.