You need to sign in to do that
Don't have an account?
Shane Jay Hayes
Cause Button Within VF element on Object to refresh entire page not just VF element
I have a VF element on my object, this element is used to upload an image to the object. When I hit the upload or delete button it performs the action but then refreshes the object page within the VF element. I would like it to refresh the entire object. Hopefully this make sense lol.
Here is the current apex:commandbutton code:
After hitting upload or delete is looks like
The easiest way to fix this would be to have the button performs its action then refresh the entire object page.
Any help is appreciated!
Here is the current apex:commandbutton code:
<apex:commandButton id="Accept" action="{!uploadAction}" value="Upload" onclick="return verifyNameLength();"></apex:commandButton> <apex:commandButton id="Delete" action="{!deleteAction}" value="Delete" rendered="{!hasPicture}" onclick="return confirm('Are you sure you want to delete the current image?')"></apex:commandButton>Right now it looks like this (still building) before clicking anything
After hitting upload or delete is looks like
The easiest way to fix this would be to have the button performs its action then refresh the entire object page.
Any help is appreciated!
It would be helpful if you share your controller's code but let's try without it. Try removing the rendered attribute from the Delete button.
Regards.
Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.