• Rost
  • NEWBIE
  • 0 Points
  • Member since 2010

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

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?

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?