on 12-12-2005 8:40 AM
Hi people
Here is my question
I have an RFC import model where one of the nodes is binded to a table. For example, the table has two columns corresponding to the attr of the conext node.
When the event is rise I put somethig like this to try to get the selected value
int n = wdContext.nodeOutput_Transport().size();
int leadSelection = wdContext.nodeOutput_Transport().getLeadSelection();
for(int i = n-1; i>=0;--i)
{
if(leadSelection==i)
{
IWDNodeElement element = wdContext.nodeOutput_Transport().getElementAt(i);
String id = element.getAttributeAsText("Transport");
The result of this is a NullPointer Exeption
the context nodes looks like this
|_ Ztmp_Poc_Uifilter_Tra_Input (node)
|_ Output_Transport (node)
|_ T_Transport (node)
|_ Desc_Transport (attr)
|_ Transport (attr)
So... when I click in a row I want to get the selected "Transport" attribute value.
Best Regards
Juan
Hi Juan,
Try this.
int n = wdContext.nodeOutput_Transport().size();
int leadSelection = wdContext.nodeOutput_Transport().getLeadSelection();
Iprivate<viewname>.IOutput_TransportElement transportElem;
transportElem = wdContext.nodeOutput_Transport().getOutput_TransportElementAt(leadSelection );
String id = transportElem.getTransport();
Please post your error and the line at which the error occurs.
Kindly consider rewarding points to helpful answers on SDN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
define a Event for leadselect. In that event handler write the following code
{
String value=wdContext.node<nodename>().current<nodeelemnt>Element().get<Attributename>();
wdcontext.currentcontextelement.set<value name>(value);
}
u try to traverse by node to element.u can get the value.
let me know if it works,
Hope this help u better,
Regards,
Arun
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
Iprivate<viewname>.IOutput_TransportElement transportElem;
transportElem = (Iprivate<viewname>.IOutput_TransportElement)wdContext.nodeOutput_Transport().getElementAt(leadSelection );
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Juan,
On ur table u will be having a property called onleadselect().Give a mtd name for that and inside that mtd try out giving this following code:
Onleadselectmtd()
{
String s=wdcontext.node<name>.get<Transportattribute>;
wdcontext.currentcontextelement.set<anotheratt>(s);
}
This should solve ur problem.
Regards,
Nagarajan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
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.