cancel
Showing results for 
Search instead for 
Did you mean: 

F4 help not being Displayed, it gives a null pointer exception

vinay_baji2
Active Participant
0 Kudos

HI,

My requirement is to get an f4 help, for an input field in a table. I am getting a null pointer exception, for the following


IWDAttributeInfo ctrInfo =
	wdContext.getNodeInfo().getAttribute(IPublicDc_Proj_Partnerfunction.IChldElement.PF);  

i Have tried placing it outside the child element too,

Pls help

Accepted Solutions (0)

Answers (4)

Answers (4)

vinay_baji2
Active Participant
0 Kudos

Thanks a lot Shruti!!

I got a solution from the code i was trying, there was a similar post on sdn.

The solution being

Try to change


wdContext.getNodeInfo().getAttribute(
IPrivateApplicantCompView.IApplicationElement.TITLE
);

to 
wdContext.nodeApplication().getNodeInfo().getAttribute(
IPrivateApplicantCompView.IApplicationElement.TITLE
);

Refer to [;

Thank you once again

Vinay

vinay_baji2
Active Participant
0 Kudos

Hi Shruti,

The values are being loaded manually, the requrement is to get the values in a look up,. for the time being we are loading it manually, (plan to change it to dynamically later on).

the present way i am filling the data is

 IPublicDc_Proj_Partnerfunction.IPartnrFuncElement ele= null;
IPublicDc_Proj_Partnerfunction.IPartnrFuncNode node=wdContext.nodePartnrFunc();
ele=node.createPartnrFuncElement();
ele.setPartnerfunctn("val1");
ele.setPF("PF1"); 
node.addElement(ele);
ele.currentChldElement().setPF("PF1");
ele=node.createPartnrFuncElement();
ele.setPartnerfunctn("val2"); 
ele.setPF("PF2"); 
node.addElement(ele);
ele.currentChldElement().setPF("PF2"); 

Former Member
0 Kudos

Vinay,

you can use the follwoing code after populating PartnrFunc node.

ISimpleTypeModifiable nType1 = wdThis.wdGetAPI().getContext().getModifiableTypeOf(ContextAttributeName bound to inputfied);
IModifiableSimpleValueSet value1 = nType1.getSVServices().getModifiableSimpleValueSet();
for(int i=0;i<size();i++)
{
 l_searchEle1  = wdContext.nodePartnrFunc().getPartnrFuncElementAt(i);
 value1.put(l_searchEle1.getPF(),l_searchEle1.getPartnerfunctn());
}

I guess the above code should work.

Regards Shruti.

Edited by: Shruti Shah on Jan 5, 2009 9:25 AM

vinay_baji2
Active Participant
0 Kudos

Hi shruti, the nodeSearcHelp is not being displayed/ accepted please could you help me out a bit further

Former Member
0 Kudos

Hi Vinay,

nodeSearch is the i had used in my code.

You need to actually acces the data in for loop which you want to populate as F4 Help.

The example i have sent you in that data is being populated from one node.

Let me know in case of further clarification or else you can explain your scenario how you are populating F4 values.

Regards Shruti.

vinay_baji2
Active Participant
0 Kudos

does it in some way depend on cardinality? the cardinality for the child node is 0..1

Former Member
0 Kudos

Hi Vinay,

You can try this code.

ISimpleTypeModifiable nType1 = wdThis.wdGetAPI().getContext().getModifiableTypeOf(ContextAttributeName);
IModifiableSimpleValueSet value1 = nType1.getSVServices().getModifiableSimpleValueSet();
for(int i=0;i<size();i++)
{
 l_searchEle1  = wdContext.nodeSearchHelp().getSearchHelpElementAt(i);
 value1.put(l_searchEle1.getCode(),l_searchEle1.getName());
}

Regards Shruti.