5
  1. Existing class Bar, many properties (e.g. fooId) with getters; successfully referenced by VF page. Been working for months.
  2. Add (today) one new property fooId2 with getter - identical in scope to fooId property.
  3. Reference that new foo2Id property in VF page; page compiles fine
  4. At runtime, VF page says Unknown Property 'bar.foo2Id'

It is as if the VF runtime engine can't find the updated compiled version of my class but the VF compiler locates the current Apex class Bar no problem.

  1. Development done in Eclipse IDE V27; no effect if classes/VF page changed to V28 or V29
  2. Confirmed through Force.com UI that class is updated in same sandbox where VF test is done
  3. CS9 sandbox

The real class Bar is complex (1000+ lines with interfaces and inner classes) but the new property fooId2 is at the top level. I've excerpted out elements here.

public without sharing class Bar {
  public ID fooId {get; set;}  // this property present long before today
  public ID foo2Id { get {return fooId;} set;} //added today
  // many other properties, methods, inner classes, interfaces, references to other classes
  public Bar() {}   // constructor
}

And a test VF page (instances of Bar are reached via extensioncontroller property qw that refers to another property qTimePeriodList)

<apex:page standardController="Quote__c" extensions="QuoteControllerExtension">
 <apex:repeat value="{!qW.qTimeperiodList}" var="qtp">
            <!-- This line displays fine -->
    <apex:outputText value="fooId={!qtp.bar.fooid}"/>&nbsp;
            <!-- But this line gets VF runtime error Unknown property 'Bar.foo2Id'
    <apex:outputText value="foo2Id={!qtp.bar.foo2Id}"/>
    <br/>
 </apex:repeat>

</apex:page>

I'm a bit baffled here as to how to resolve. Could there be a complexity issue with my Apex class causing the VF runtime engine to not be able to resolve symbols? Since the VF page displays w/ no issue all my properties from before today and can't seem to find any newly added (today) properties no matter where I insert the new properties in my code or how I name them (foo, fie, xxx, ...) it seems more likely that the VF runtime engine is working off an old version of my class (but that seems far fetched).

4

Mirabilu dictu. I left this problem 14 hours ago, went home, went to sleep, did not touch my code in any way, and when I came back to work and retried, the problem went away.

This lends credence to my hypothesis that the VF runtime engine had lost connectivity to the latest version of my class Bar. Some sort of replication issue in cs9? Here, I'm guessing, but I'm glad it is resolved.

  • My office mate, more experienced in these matters; suggested that it could be a SFDC cache management issue wherein the VF runtime engine was using a cached copy of my Bar class that didn't refresh when Bar was changed to add the new property foo2Id – cropredy Oct 4 '13 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.