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

Embedded VF errors with Page Layouts
I am able to embed the VF page I want into a custom controller, but its behavior is very weird.
I have a series of currency values that I am putting in a panel grid. The VF Code looks like this:
<apex:page standardController="Object__c" extensions="RevenueBookController"> <apex:CommandButton action="{!save}" value="Update Revenue Book" rerender="thePanel" /> <apex:form > <apex:CommandButton <apex:outputPanel id="thePanel"> <apex:panelGrid columns="6" id="theGrid" width="80%"> <b>Revenue Types:</b> <apex:outputText value="Month 1" id="Month1"/> <apex:outputText value="Month 2" id="Month2"/> <apex:outputText value="Month 3" id="Month3"/> <apex:outputText value="Quarter" id="Quarter"/> <apex:outputText value="Total" id="Total"/> <apex:outputText value="Revenue: " id="Revenue"/> <apex:inputField value="{!Object__c.Revenue_Month1__c}"/> <apex:inputField value="{!Object__c.Revenue_Month2__c}"/> <apex:inputField value="{!Object__c.Revenue_Month3__c}"/> <apex:inputField value="{!Object__c.Revenue_Quarter__c}"/> <apex:outputField value="{!Object__c.Revenue_Total__c}"/> </apex:panelGrid> </apex:outputPanel> </apex:form> </apex:page>
When I go to the page it looks right - the input fields show up in a grid as expected. However, when I add a value to one of the input fields and hit the update button, the entire page refreshes within the VF section.
What I want to happen is to just have the outputpanel refresh with updated numbers in the Total field.
Its probably something obvious, but its stumping me. Any suggestions and solutions appreciated.
What does your save method inside RevenueBookController look like?
If you didn't override it or have it returning a non-null value, the page will refresh. If it returns null, the desired result occurs -- that is it simply rerenders what you requested.
Cheers,
Ray
Here is the controller code
The Total Values are formula fields that I want to update after the user adds values to the inputFields and updates the record with the button.
However, the Total values weren't updating. Not sure why. This is my first VF piece in a couple months so its probably something obvious I'm missing.
I found a way to get what I wanted to happen - instead of using the Controller at all, I just added '{!quicksave}' as the action for the commandbutton. The re-render then works as expected and the Total formula fields reflect the updated values. This will work for m purposes, but it seems like the original process should have worked. So either the update command wasn't firing (it was according to the debug log), the new value wasn't getting assigned to the field (I thought the inputField took care of that), or the re-render might not have been re-rendering, even though it was clearly assigned. I don't think any of those could be the problem.
Thanks for the response.