You need to sign in to do that
Don't have an account?
Not wanted full page refresh
Can you tell me why, when I click the Edit or Save Link, it refreshes the entire side (including SFDC header and sidebar, if sidebar is not visible, it shows it and then disappears))
<apex:page Controller="NexTestController" standardStylesheets="true"> <apex:pageBlock title="Test {!selectedId}" id="listblock"> <apex:form > <apex:panelGroup id="mypanel"> <table with="100%"> <apex:repeat value="{!Relationships}" var="relation"> <apex:panelGroup rendered="{!or(selectedId != relation.Id,selectedId==null)}" style="border-bottom: 1px solid grey"> <tr> <td><apex:outputText value="{!relation.Id}" style="padding:4px" /></td> <td><apex:outputText value="{!relation.Analysis_Period__c}" style="padding:4px" /></td> <td><apex:outputText value="{!relation.Relationship_Code__c}" style="padding:4px" /></td> <td><apex:outputText value="{!SelectedId}" style="padding:4px" /></td> <td><apex:commandLink value="Edit" action="{!edit}" onmousedown="setEditorToLine('{!relation.Id}')" id="editbutton" rerender="mypanel"/></td> </tr> </apex:panelGroup> <apex:panelGroup rendered="{!selectedId == relation.Id}" style="border-bottom:1px solid #DADADA"> <tr> <td><apex:inputField value="{!relation.Id}" style="padding:4px" /></td> <td><apex:inputField value="{!relation.Analysis_Perios__c}" style="padding:4px" /></td> <td><apex:inputField value="{!relation.Relationship_Code__c}" style="padding:4px" /></td> <td><apex:inputField value="{!relation.Contact__c}" style="padding:4px" /></td> <td><apex:commandLink value="Save" action="{!save}" onmousedown="setEditorToLine('{!relation.Id}')" id="savebutton" rerender="mypanel" /></td> </tr> </apex:panelGroup> </apex:repeat> </table> </apex:panelGroup> <apex:actionFunction action="{!edit}" name="setEditorToLine"> <apex:param name="firstParam" assignTo="{!selectedId}" value="" /> </apex:actionFunction> </apex:form> </apex:pageBlock></apex:page>
In my mind it should only refresh "mypanel"
Thanks, that helped, I used that ActionRegion tag with the rederRegionOnly tag.
Thanks
All Answers
Try to use outputPanel instead of PanelGroup. I hope it works, and if this still wont work then please send you controller also.
Thanks,
ckum
Sorry, ckum, that did not work out.
Here is my controller:
public with sharing class NexTestController { private final Account account; private final List<Relationship__c> relationships; public String selectedId {get; set;} public NexTestController(){ account = [select id, PersonContactId, name, site from Account where id = :ApexPages.currentPage().getParameters().get('id')]; relationships = [select Analysis_Period__c, Relationship_Code__c, Contact__r.Id, Contact__r.Name, Contact__r.LastName, Analysis_Perios__c from Relationship__c where Contact2__r.Id = :account.PersonContactId]; selectedId = 'MyTest'; } public Account getAccount(){ return account; } public List<Relationship__c> getRelationships(){ return relationships; } public PageReference edit(){ return null; } public PageReference save(){ return null; } }
Thanks, that helped, I used that ActionRegion tag with the rederRegionOnly tag.
Thanks
Sorry, I was too quick.
In 1 out of approx. 10 klicks on the link, it flashes up the sidebar, which quickly disappears again.
And: The entire page turns to white and builds up again. That is not the right behaviour, right?
VERY inkonsistent!
Try to rework your page so it loads faster, or at least so you are rendering and rerending a smaller area?
Other than that, log a support call and see what SFDC support tells you.