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

Summer 09 rerender Firefox vs. IE
I've run into some issues after the summer 09 update changing the behavior of commandButton/commandLink rerenders and it behaves differently in Firefox vs. IE. I've got a pageBlockTable with one column containing a "Copy" commandLink and the next column containing an inputField. Clicking the Copy link will copy the value from the inputField on that row to all other objects in the list. The commandLink then refreshes the pageBlockTable only so the copied values are displayed to the user. This much works perfectly in both Firefox and IE.
However IE goes a step further. After refreshing the pageBlockTable and displaying the copied values correctly, it then refreshes the entire page. Problem is, this causes the original queries to re-fire and all the object values are returned to their original values and the user's "copy" is wiped out before their eyes. This second refresh does not happen in Firefox.
<apex:pageBlockTable id="avlist" value="{!accountVariables}" var="av">
<apex:column headerValue="Copy">
<apex:commandLink value="Copy" action="{!copyFieldValue}" status="accountcopy" rerender="avlist" rendered="{!IF(contains(av.Category__c, 'Account'), 'true', 'false')}">
<apex:param name="avarid" value="{!av.Account__c}"/>
<apex:actionSupport event="oncomplete" status="accountsuccess"/>
</apex:commandLink>
</apex:column>
<apex:column headerValue="{!av.FieldID__c} {!av.Variable_Master__r.Name}">
<apex:outputPanel id="editvalue" rendered="{!IF(AND(OR(av.Type__c='Image',contains(av.Type__c, 'Text')), contains(av.Category__c, 'Account')), 'true', 'false')}">
<apex:inputField value="{!av.Value__c}"/>
</apex:outputPanel>
</apex:column>
</apex:pageBlockTable>
As per the documentation:
commandLink
A link that executes an action defined by a controller, and then either refreshes the current page, or navigates to a different page based on the PageReference variable that is returned by the action.
So instead of commandLink, try using a normal link or outputLink and connect an actionSupport / actionFunction to it.
That should solve your problem.
[edit] just saw your reference to the documentation, and this is one of the problems I have. What I see in the log is not what the documentation says.
commandLink
A link that executes an action defined by a controller, and then either refreshes the current page, or navigates to a different page based on the PageReference variable that is returned by the action.
What I see is a page refresh running first, then action executed, then ANOTHER refresh. My PageReference returns null to remain on the same page. And backdating to 15 fixes the problem.
Not sure if this will make a differece but what happens if you change the copyFieldValue method to a void method.
//I assume it currenty looks like this: public PageReference copyFieldValue(){ //logic retrun null; } //What happens if you change it to this public void copyFieldValue(){ //logic }
Thats another interesting thing I noticed a few days back. If an action method returns Void, it's treated as if it's returning null as PageReference. So the calling page is refreshed again.
Another thing is that if you return a String from a method, and return a valid URL as the string, the page will redirect to the new URL.
Have you guys noticed this behavior?
I switched back to v15 and IE again worked as it should, rerendering only the pageBlockTable. The only problem is now the actionStatus behavior is inconsistent. But that's infinitely preferable to the refresh problem.
Case logged: 02739770
I noticed this behaviour not too long ago on one of my pages. I think the reason is that you have an action support within your commandLink so your first refresh is because of your commandLink whilst your second refresh is because of your action support.
Try adding reRender="" on your action support to see if this solves the issue.
[edited, I spoke too soon]
Excellent suggestion, but it didn't work. The reason I did it the way I did was it was the only way I could get the timing of the rerender and actionStatus working, so that it both made sense to the user and actually worked the way I wanted. Though it didn't make sense from a coding point of view. Now it rerenders immediately and apparently does NOT run the copyFieldValue method at all. Here's what I tried:
- set page and controller to v16
- changed the copyFieldValue method to void
- moved the rerender from the commandButton to the actionSupport
Apparently the result is that the two status messages fire in the proper order (commandButton then actionSupport), and then the rerender fires but the underlying copy method isn't run, because the value I changed is returned to the original. Very strange.