cancel
Showing results for 
Search instead for 
Did you mean: 

Assistance class - Method should be of which type STATIC/INSTANCE

mahesh_jagnani
Participant
0 Kudos

Hi Experts,

I am using an Assistance class in WD Component.

There are several methods in that Assistance class .

Can u plz tell me when we should use static method and when we should use Instance method.

Thanks

Mahesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Static methods are handy for utility purpose or functional methods. You call the method with our getting the instance of the class.

Assistance class are automatically instantiated by the framework when the component is instantiated. So no advantage of having static method in it.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mahesh,

You can use Instance method in Assistance class.because anyway you no need to instanitate the Assistance class. WDA Framework will be instanitate assitance class automatically. you can call the assistance class method using standard attribute WD_ASSIST.

Thanks and Regards,

Vijay