You need to sign in to do that
Don't have an account?
Robert Zentgraf
Refresh a visualforce page after save
Hi @all,
I created a VF-page and if the user press on the save button, then the page should save the values (this is working fine) and refresh themself like pressing F5 on keyboard. Is this possible?
Regards
Robert
I created a VF-page and if the user press on the save button, then the page should save the values (this is working fine) and refresh themself like pressing F5 on keyboard. Is this possible?
Regards
Robert
Is there any return type for the save method if not, use this:
change your method to:
public pageReference yourmethodname(){
//your current logic
return ApexPages.currentPage();
}
Thanks,
Balaji
thx for you reply, but it's not working. I'm not sure, why.
Additional information: there is a roll-up-field (sum) of all entrys (integer-values) on the VF-page. This roll-up-field is saved on the parent object. And it shows the correct value at the beginning. But when I change or add some values then this field won't be reloaded. So, if I press F5, I see the correct value!?
Regards
Robert
<apex:commandLink value="Save" StyleClass="btn" action="{!youractionmethodname}" target="_top" />
or
<apex:commandButton>
<apex:commandLink value="Save" action="{!youractionmethodname}" target="_top" />
</apex:commandbutton>
Thanks,
balaji
Can you post some of the code you are using, the VF page and the save method? It would help with troubleshooting the issue.
Tyler
I tried your idea, but it's not working. The page is not refreshed in this field.
Here the VF-Page:
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!saveTage}"/>
</apex:pageBlockButtons>
<div style="over-flow:auto; width:1200px;">
<apex:pageBlockTable Id="Table_Zeiten" value="{!tage}" var="t" rowClasses="row1, row2">
<apex:facet name="header">
<apex:outputText value="Total Time: {!ParentObject__c.Field__c}"/>
</apex:facet>
<apex:column headerValue="Time" style="width:45pt;">
<apex:outputtext Id="Field_Hours" value="{!t.Arbeitszeit}" visibility: {!t.visibility};"/>
</apex:column>
</apex:pageBlockTable>
</div>
</apex:pageBlock>
</apex:form>
And Apex:
}
Info to ParentObject__c.Field__c:
Data Type => Roll-Up Summary Summary
Type => SUM
Summarized Object => ChildObject
Field to Aggregate => ChildObject: Field_CO__c
Regards
Robert
I changed the Apex, but it dosn't solve this issue. Shall I also change something in the VF-page?
Regards
Robert
I have some simliar issue, I need to save the values after refresh. When i Press the Save button it saves the values but when i hit F5 or refresh the values are gone , they are not saved in my VF page. Any idea how i can achieve this ??
Best Regards,
Shobhit