• Rost
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies

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

http://community.salesforce.com/t5/Visualforce-Development/Visualforce-page-disappears-in-Dashboard-refresh/m-p/167442

http://community.salesforce.com/t5/Force-com-Sites/Component-contains-dataTable-rerender-its-disappears/td-p/167798

  • May 03, 2010
  • Like
  • 0

I have a long list of "Product Types"  picklist with controller "Segment" picklist.

I can load complete Product Types picklist in Apex, but how can I get valid list of  Product Types for the given Segment?

I searched documentation and only found that there is a field "validFor" that exists for PicklistEntry in API but does not exist in Apex.

 

My questions are:

1. Is there any "pure-Apex" solution to access the mapping?

2. If not, is there a workaround like calling API from Apex to achieve same goal?

  • April 06, 2010
  • Like
  • 0

I have a 3 VisualForce pages with almost identical content, but working with different controllers. I tried to extract common content and use <apex:include> tag but got following problems:

 

1. Page does not compile unless it is a "complete" page with <apex:page> tags, although the intent is to include that page into another ("main") page. I had to add <apex:page> tags.

 

2. Then page would not compile because it references custom controller data structures. I had to add controller description at the top. Now both "main" and "include" pages have controllers defined, with "include" page having a preference! As a result, I no longer can use different controllers at my 3 separate pages.

 

Is there a solution to this problem?

  • March 18, 2010
  • Like
  • 0

I have a long list of "Product Types"  picklist with controller "Segment" picklist.

I can load complete Product Types picklist in Apex, but how can I get valid list of  Product Types for the given Segment?

I searched documentation and only found that there is a field "validFor" that exists for PicklistEntry in API but does not exist in Apex.

 

My questions are:

1. Is there any "pure-Apex" solution to access the mapping?

2. If not, is there a workaround like calling API from Apex to achieve same goal?

  • April 06, 2010
  • Like
  • 0

I have a 3 VisualForce pages with almost identical content, but working with different controllers. I tried to extract common content and use <apex:include> tag but got following problems:

 

1. Page does not compile unless it is a "complete" page with <apex:page> tags, although the intent is to include that page into another ("main") page. I had to add <apex:page> tags.

 

2. Then page would not compile because it references custom controller data structures. I had to add controller description at the top. Now both "main" and "include" pages have controllers defined, with "include" page having a preference! As a result, I no longer can use different controllers at my 3 separate pages.

 

Is there a solution to this problem?

  • March 18, 2010
  • Like
  • 0