You need to sign in to do that
Don't have an account?
unable to acess static variable in non static method
Hi,
I am facing a problem while accessing a static variable in non static method.
from a visulaforce pagewhen a button is clicked i am calling a remoteaction method which is static . in that method i am assigning the id of a perticular object to a static filed called agreementId.After this remoteaction method i am calling an action function which calls a non static method , in that method i need to use this static field agreementId . when i am printing this it is giving as null .
I tried to access this filed by using classname.filed still it didn't work .
Please let me know how to access this field .
Means there is no other way to maintain the same value for different requests .
I can't use public variable in static method right ?