You need to sign in to do that
Don't have an account?
adreamer
Page.existingPage does not compile
Hi All,
In one of the test methods for a controller extension I am setting the page to the controller using:
Test.setCurrentPage(Page.existingOne);
Yesterday compiled all day. Today after the first compile I get a compile error: variable does not exist: Page.existingOne .
In addition, the line:
PageReference p = Page.existingOne;
does not compile either and gives the same compilation error.
The page existingOne.page exists in the org, and none of the pages has the word "page" in their name.
Any ideas ?
Thanks,
Fernando
Have you added a class or variable called "Page"?
All Answers
I thing this page does not exist in your org that is the only reason that comes to my ming. I would like you to check in your org through browser where it exists or not. Some time when you delete a page it still comes in eclips till you refresh your code. Please check one more time through your broser. In case it exists then please provide me your class version number. I will try my self then.
Have you added a class or variable called "Page"?
Hi Aballard,
You are spot on !. I don't have any page that its name includes the string "page" but I did have a variable named "page" and that was the cause of the issue.
It seems that the Visualforce compiler gets confused if one uses such a variable name.
Thank you very much !
Fernando
Hi Shashikant ,
Thanks for your reply.
The issue as you can see from the thrad is that I had a PageReference variable called "page".
Regards,
Fernando