You need to sign in to do that
Don't have an account?
VisualPage Components disappear after re-render
I have noticed that Components disappear after clicking some action buttons in my customized application. Attached is a very simple test example that illustrates the problem. Is this a bug in SalesForce?
Main Visual Page code:
<apex:page standardController="Opportunity" extensions="EditScheduleController"> <apex:form > <apex:pageBlock id="schedule" title="Test"> <apex:commandButton action="{!refresh}" value="Refresh" reRender="schedule"/> <table> <tr><c:EditSchedule_OppEditComponent /></tr> <tr><c:EditSchedule_OppEditComponent /></tr> <tr> <td>This is a text from the MAIN page.</td> </tr> <tr><c:EditSchedule_OppEditComponent /></tr> </table> </apex:pageBlock> </apex:form> </apex:page>
Component "EditSchedule_OppEditComponet.component":
<apex:component > <td>This is a Component output.</td> </apex:component>
Controller "EditScheduleController.cls":
public class EditScheduleController { public EditScheduleController(ApexPages.StandardController controller) { } public PageReference refresh() { return null; } }
After opening page it looks like:
[Refresh]
This is a Component Output.
This is a Component Output.
This is a text from the MAIN page.
This is a Component Output.
After clicking [Refresh] button all component outputs disappear.
I have noticed some other reports on the same subject (search for "component disappears"):