You need to sign in to do that
Don't have an account?
ViewState error on PageLoad not Postback
Maximum Viewstate size exceeded ... error on Page Load is occuring and nothing loads on the visualforce page. The size reportedly exceeds to around 150K .. :( ....
Now I searched around in forums but I figured that using Transient keyword can minimize the Viewstate size, but my understanding says that even Transient keyword usage will ONLY save me when my page Postback and that the viewstate does not gets saved for un necessary variables .. but I don't think with Fresh page load this keyword gonna make any difference.
Please help ... I even could not Test and verify it in code ... is there any tool with which I can Test & verify the Visualforce Page's ViewState size ???
Hey
What does your page contain? Any documents? Does your controller hold any Blobs? If the page you're navigating to is Page B, does Page A (the page you come from) use the same controller as page B?
Wes
Actually its a Visualforce page that is acting like a Tab. and error occurs when I click on the Tab link to open the page.
The page doesn't deals with any Document or Attachment object. there is no Blob type variable used in the class.
The Tab is desired to show Some Records from Events/Tasks & one more custom Objects. The recordsa are displayed using wrapper classes since I need to implement checkbox selection for the displayed records. There is a button on display such that it processes selected records.
But problem for me is this that, I'm not even able to click the button, the error occurs simply on Page Load.
For an Estimate the records count on display can be in this range 1 - 4000 records. No more than 4000 records can be shown on this page because a List object can hold 1000 records and I created 4 list objects for 4 different types of ObjectTypes.
Yeah I've only had this issue on pageloads, and it happens when there's just too much data (blobs are always a likely candidate). I'm guessing if you enforce limits on your queries (something like 10 to start with) the page loads?
Wes
Wes,
What is the implication if Page A & Page B use the same controller & navigate to each other?
I have a couple pages doing that and am having Internal Server Errors. I submitted cases, but haven't heard back yet.
Thanks,
Rich C.
Ah, this is the complaint of many people.. the closest tool you have is are the limit methods. Although there's nothing specific about the viewstate in there you might be able to use other limits indirectly to gauge your situation e.g. heapsize.
Good luck,
Wes
Hey Rich
Internal server errors are problems SF have on their side of things i.e. the Java that supports/is underneath the code fails for some reason. The number you get tells them the stacktrace they should be looking at.. these errors 'fix themselves' most of the time if given a bit of time.
The implications of what I mentioned are that, if pages are sharing a controller, and the controller becomes bloated (the vars are carrying alot of data from page to page) then you can also hit the above mentioned error.
Wes
I did used about 4-7 Controllers ... on the page but None of them is Interacting with Data in class on page load.
3 Components use same class but no data is interacted until a button is clicked on the page. Other 4 are just simple Divs or html tags which are used to customize display on the Tab.