+ Start a Discussion

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"/>
      <tr><c:EditSchedule_OppEditComponent /></tr>
      <tr><c:EditSchedule_OppEditComponent /></tr>
        <td>This is a text from the MAIN page.</td>
      <tr><c:EditSchedule_OppEditComponent /></tr>



Component "EditSchedule_OppEditComponet.component":

<apex:component >
<td>This is a Component output.</td>

 Controller "EditScheduleController.cls":

public class EditScheduleController {
  public EditScheduleController(ApexPages.StandardController controller) {
  public PageReference refresh() { return null; }


After opening page it looks like:


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"):