on 08-11-2007 5:51 AM
Hi,
I have a wdj application it is creted using two dcs so when in the first dc after model is executed it returns a process id and i want that processid to be in my second dc so plz help me how can i catch that process id from first dc and get it from second dc.
Thanks,
santhosh.
Suppose you have following scenario:
1) DC2 having component Comp2. In this dc you read the process id and stores it in context variable "ProcessId".
2) DC1 having component Comp1. Here you want to read the process id from comp2.
In Comp2 create a method getProcessId()
//@@begin javadoc:getProcessId()
/** Declared method. */
//@@end
public java.lang.String getProcessId( )
{
//@@begin getProcessId()
return (String) wdContext.getCurrentElement().getAttributeValue("ProcessId");
//@@end
}
In the interface controller of Comp2 create controller dependency to Comp2 controller. Then in interface controller create method getProcessId()
//@@begin javadoc:getProcessId()
/** Declared method. */
//@@end
public java.lang.String getProcessId( )
{
//@@begin getProcessId()
return wdThis.wdGetWd2CompController().getProcessId();
//@@end
}
Expose the Comp2 as public part now.
In DC1 create DC dependency to DC2.
Build both dc's
In Comp1 create Component usage by name Comp2Usage to Comp2.
Now you can access the method getProcessId() from interface controller of Comp2.
wdThis.wdGetComp2UsageInterface().getProcessId();
Best Regards,
Ashwani Kr Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Ashwin thank you for your reply,but i did every thing like what you said but
i m unable to call the getprocessid method of previous dc ie
return wdThis.wdGetWd2CompController().getProcessId();
after wd.getwd2CompController i m unable to see the getprocessid method ,
plz help me
Thanks & Regards,
santhosh.
hi ashwin,
i m sorry , ie im not getting the method in another dc wdthis.wdget<name>componentusage.method of interface controller but im unable to see this method name,
Thanks & Regards,
santhosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ashwin,
i m sorry , ie im not getting the method in another dc wdthis.wdget<name>componentusage.method in interface controller but im unable to see this method name,
Thanks & Regards,
santhosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.