cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Error in Method

dhruv_shah3
Active Contributor
0 Kudos

Hi All,

I have created a Method. and I have a structure named as Person which has First Name and LastName.

Now i have a method named as public void InitPerson()

so when i write IPersonElement personE1 = wdContext.nodePerson().currentPersonElement();

Then i am getting the Following Error:

IPersonElement cannot be resolved or is not a type.

So pls help me out asap.....

Regards,

Dhruv Shah

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Dhruv,

if the problem u experience is taking place during Design Time, that seems like you miss some import definition. So please try next:

In you NWDS, open the implementation tab of your component and do a right mouse click. In dipsplayed context menu - select:

Source - > Orginize Imports.

If you did write your class name IPersonElement right, then it will be imported automatically. In other case, check what type of object does method currentPersonElement() return.

hope it helps.

regards.

mz

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Hope you have binded the person node to the controller where you are trying to write this code.

Regards,

Murtuza

Former Member
0 Kudos

Hi,

Right click on code part, select source-->organize imports

Use IPrivate<viewname>View.IPersonIPersonElement personE1 = wdContext.nodePerson().currentPersonElement

Regards

LakshmiNarayana

Former Member
0 Kudos

Hi,

Right click on the code and Click Source->Organize Imports.

or else use the shortcut ShiftCtrlO from the java editor.

Regards

Ayyapparaj