on 08-01-2007 6:07 AM
Hi all,
I am looking to do context mapping of a value attributes at run time(by coding).
I have one value attribute in my Componet Controller and another value attribute in an interface Controller of another component. I want to do context mapping at runtime.
Any help would be rewarded accordingly.
Regards,
Subu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for your replies.
how do I specify which value attribute to context map? I also want to remove the context mapping at runtime.
Regards,
Subu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The value attributes are not created at runtime. They are added at design time. I only want to do the context mapping at runtime.
Regards,
Subu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this:
//the node in the component controller
IWDNodeInfo destNodeInfo = wdContext.getNodeInfo();
//the node in the interface controller
IWDNodeInfo srcNodeInfo = wdThis.wdGet<external component>Interface().wdGetAPI().getContext().getRootNodeInfo();
//Map alll attributes of the same name.
destNodeInfo.setMapping(srcNodeInfo,true);
Regards,
Satyajit.
Hi,
Thanks for your reply.
I checked the link above it talks about creating a node and then doing context mapping. I would like to do context mapping of a value attribute directly under the root node.
Regards,
Subu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Subramaniyan,
I think u need this only.
public void wdDoInit()
{
//@@begin wdDoInit()
//Dynamically create a context node
IWDNodeInfo poNodeInfo = wdThis
.wdGetPurchaseOrderCompInterfaceController()
.wdGetAPI()
.getContext()
.getRootNode()
.getChildNode("DynamicPurchaseOrder",
IWDNode.LEAD_SELECTION)
.getNodeInfo();
IWDNodeInfo localNodeInfo = wdThis.wdGetAPI().getContext()
.getRootNodeInfo()
.addMappedChild("DynamicPO", null, true,
false, false, null, false, true);
//Dynamically map the context node
localNodeInfo.setMapping(poNodeInfo, true);
localNodeInfo.addAttributesFromDataNode();
Here for both controllers u can take attribute directly from the context(without node) wdThis.wdGetAPI..getContext.getRootNodeInfo & map the attributes from that.
regards
Sumit
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.