1

I created a visualforce page with some input fields and a save button and there is also an output field which is based on the input fields.

After I click save, the output field remains the same and I need to refresh the page to see the changes.

I want the visualforce to refresh itself but it won't. I tried oncomplete="location.reload()" or return ApexPages.currentPage (in the controller) and similar things but nothing seems to work.

Any help ? Thanks.

closed as off-topic by Ratan Paul, dphil, crmprogdev, Adrian Larson, Himanshu Jan 26 '16 at 17:19

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: SSCCE.org" – dphil, crmprogdev, Adrian Larson, Himanshu
If this question can be reworded to fit the rules in the help center, please edit the question.

  • is your VF page inline VF page? – Ratan Paul Jan 26 '16 at 13:06
  • do not use rerender attribute. – Tushar Sharma Jan 26 '16 at 13:07
  • The VF is inside the opportunity layout – osos9 Jan 26 '16 at 13:10
  • If return null; does not work, please share save button code on Visualforce page and controller's method. – Andrii Muzychuk Jan 26 '16 at 13:57
  • 1
    @TusharSharma, why ReRender should not be used here? – Andrii Muzychuk Jan 26 '16 at 14:56
0

Have you tried

return null;

in save method of VF's controller?

EDIT:

add ReRender="myForm" to your actionButton

  • 'return null' is already in but it doesn't do much – osos9 Jan 26 '16 at 13:57
  • @osos9, what does id do? – Andrii Muzychuk Jan 26 '16 at 13:58
  • It doesn't refresh the page – osos9 Jan 26 '16 at 14:01
  • Wow. Yes, it shouldn't, Please, check stackoverflow.com/questions/12804530/… . Have you tried return ApexPages.currentPage(); – Andrii Muzychuk Jan 26 '16 at 14:07
  • 1
    This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review – Sergej Utko Jan 26 '16 at 15:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.