cancel
Showing results for 
Search instead for 
Did you mean: 

calling the attributes getter method

lokesh_kamana
Active Contributor
0 Kudos

Hi,

I have a context->attribute(attribute name = status).

and changed the property calculated->true;

Then got getter & setter methods.

The following is the get method

public void getStatus(IPrivateViewDefects.IContextElement element).

Now my Requirement is to call that method.

The method is being called.

My doubt is what paramtere we have to pass for this method.

It is asking for the argument of this type IPrivateViewDefects.IContextElement element;

Please explain me this?

Thanks & Regards,

Lokesh@EDS.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Lokesh,

When you make an attribute calculated then the return type of the getMethod should be the data type of the attribute

Ex: if context att name is Name and type is string

to access this

wdContext.currentContextElement().getName();

Your get method will be as follows

public java.lang.String getName(IPrivateTeCompView.IContextElement element)

{

//@@begin getName

return "Hello";

//@@end

}

Regards

Ayyapparaj

Answers (1)

Answers (1)

Former Member
0 Kudos

Just call wdContext.currentContextElement().getStatus(). If you don't need the setter, what I assume, set the context attribute to read-only.

Armin