You need to sign in to do that
Don't have an account?

Reload page after insert on the database
hi.
i develop a force.com site with 3 pages and in the end i insert a record on the SF updating a field that i show on the second page.
but..without closing the browser, i click on the link to go to the first page, navegate into the second page and the field is not updated..just only when i click refresh to reload the browser.
someone can help me?
tks
The cache attribute on the apex:page standard component tells the browser whether to cache the page or not. For regular VF it defaults to false, but for sites it defaults to true. There's more information on Sites caching at:
http://wiki.developerforce.com/index.php/Force.com_Sites_Best_Practices#Caching.2C_Performance.2C_and_Daily_Limits
it sounds like you want to set this explicitly to false.
All Answers
Do these pages use the same controller instance (e.g. are they a wizard?)
different controllers but is like a wizard.
In that case, I'd expect navigation between pages to reload the record from the database.
When the record is saved, do you redirect the user anywhere or do they just stay on the same page?
i explain the process.
on the first page, i show a list of courses where the user select one clicking on a link.
on the second page, i show the session that are available to the course that the user was selected and the available seats for each session (for example 4 seats).
on the last page, the user make the registration and after insert i redirect to a thank you page.
but imagine that i want to register again but in the another session, i will go the first and select the same course and finally on the second page, the page is not reloaded - show me the same available seats (4 seats) but when i do "refresh", my last insert appear ( 3 seats).
How do you go back to the first page? If you use the browser history, then I guess you may be hitting a cached page.
im not using the browser history or clicling on the back button.
I just type the fist page in the browser and enter.
That's very strange - by navigating back to the page that way, a new instance of the controller should be created. This sounds like browser caching to me. Have you checked your browser cache settings?
do you want the link to see the problem? its force.com site
Ah - Sites are a little different I think. Have you specified any cache attributes on the page?
no - i dont know what is that
The cache attribute on the apex:page standard component tells the browser whether to cache the page or not. For regular VF it defaults to false, but for sites it defaults to true. There's more information on Sites caching at:
http://wiki.developerforce.com/index.php/Force.com_Sites_Best_Practices#Caching.2C_Performance.2C_and_Daily_Limits
it sounds like you want to set this explicitly to false.
solved!!! :D