-
1. Re: EntityQuery, page context, query caching
joblini Mar 29, 2009 8:32 PM (in response to dsailer.d.sailer.comcast.net)Hi,
Here are a couple of pointers that may help to figure out what is going on:
1) The constructor will be called twice each time the component is created, more about this here
Suggestion: instead of the constructor, create a method annotated with @Create to get a precise count of component creations.
2) The calls to EntityQuery are driven by pages.xml. More about this here and here
3) Note that EntityQuery does not include a @Scope annotation (unlike EntityHome, which is scoped to the conversation). You might want to add @Scope(CONVERSATION), or use the @Factory annotation.
Hope this helps.
-
2. Re: EntityQuery, page context, query caching
dsailer.d.sailer.comcast.net Mar 29, 2009 10:00 PM (in response to dsailer.d.sailer.comcast.net)thanks, that's very helpful. I did add @Scope(PAGE) to EntityQuery. Thats what was causing the 16 calls to the ctor, which I still don't understand. I switched to Scope(CONVERSATION) and get pretty much what I want.