Re: ERExcelLook problem: Couldn't find the dynamic page named ...

2010-09-11 Thread Klaus Berkling

On Sep 10, 2010, at 6:51 PM, David LeBer wrote:

 The page configuration name is not arbitrary, if your entity is named 
 'AttendeeSelectedVEvent', then the page configuration needs to be 
 ListExcelAttendeeSelectedVEvent

Fixed that. Cool.

 D2W uses the name of the page configuration to figure out what kind of entity 
 it is working with.

I though that's why I did this:

 EOArrayDataSource ds = new EOArrayDataSource(
   EOEntityClassDescription.classDescriptionForEntityName(
   AttendeeSelectedVEvent.ENTITY_NAME
   ), 
   ec
   );




kib

We keep moving forward, opening new doors, and doing new things, because we're 
curious and curiosity keeps leading us down new paths.
Walt Disney

Klaus Berkling
Web Application Dev.  Systems Administrator
DynEd International, Inc.
www.dyned.com | www.eskimo.com/~kiberkli




 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: ERExcelLook problem: Couldn't find the dynamic page named ...

2010-09-10 Thread David LeBer

On 2010-09-10, at 9:42 PM, Klaus Berkling wrote:

 
 I have been looking at David LaBer excellent D2W screencast for ExcelLook 
 (http://davidleber.net/?p=369) and it seemed fairly easy.
 
 I've followed the screencast very closely but yet I see the following error 
 when invoking the excellook:
 
 Couldn't find the dynamic page named ListExcelParticipants in your 
 DirectToWeb model.entity is null, it seems that one model, maybe 
 ERDirectToWeb d2w.d2wmodel is not loaded!
 
 This is weird: model.entity is null. Specifying the entity as 
 EOEntityClassDescription.classDescriptionForEntityName(AttendeeSelectedVEvent.ENTITY_NAME)
  makes no difference.
 
 I've verified the page configuration name.
 
 This is the only D2W part in the whole app, this is a Wonder app 
 (ERXApplication, ERXSession).
 WO 5.4.3
 (Where do I find the WOnder build number?)
 WOLips 3.5.6066
 
 There is only one poi file in 
 /Library/Frameworks/ExcelGenerator.framework/Resources/Java, if that makes a 
 difference: poi-3.2-FINAL-20081019.jar
 I don't think it gets that far.
 
 Any thoughts anyone, all you D2W people, Daves?
 
 Here is the code:
 
 public WOActionResults downloadAsExcelAction() {
   ListPageInterface lpi = 
 (ListPageInterface)D2W.factory().pageForConfigurationNamed(
   ListExcelParticipants, 
   session()
   );
   //EOArrayDataSource ds = new EOArrayDataSource(null, ec);
   EOArrayDataSource ds = new EOArrayDataSource(
   EOEntityClassDescription.classDescriptionForEntityName(
   AttendeeSelectedVEvent.ENTITY_NAME
   ), 
   ec
   );
   ds.setArray(attendeeSelectedVEventList);
   lpi.setDataSource(ds);
   lpi.setNextPage(this.context().page());
   return (WOActionResults)lpi;
 }

Wait, what!?

The page configuration name is not arbitrary, if your entity is named 
'AttendeeSelectedVEvent', then the page configuration needs to be 
ListExcelAttendeeSelectedVEvent

D2W uses the name of the page configuration to figure out what kind of entity 
it is working with.

 
 This is my d2wmodel (user.d2wmodel):
 
 {
   rules = (
 {
   author = 1000; 
   class = com.webobjects.directtoweb.Rule; 
   lhs = {
 class = com.webobjects.eocontrol.EOKeyValueQualifier; 
 key = pageConfiguration; 
 selectorName = isEqualTo; 
 value = ListExcelParticipants; 
   }; 
   rhs = {
 class = com.webobjects.directtoweb.Assignment; 
 keyPath = displayPropertyKeys; 
 value = (
   attendee.nameFamily, 
   attendee.nameGiven, 
   participant
 ); 
   }; 
 }
   ); 
 }
 
 The exception goes off into the weeds:
 
 Sep 10 17:53:05 Conference[5] ERROR 
 er.extensions.appserver.ERXApplication  - Couldn't find the dynamic page 
 named ListExcelParticipants in your DirectToWeb model.entity is null, it 
 seems that one model, maybe ERDirectToWeb d2w.d2wmodel is not loaded!
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at 
 com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:636)
   at 
 com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1134)
   at 
 com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324)
   at 
 com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736)
   at 
 com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447)
   at 
 com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
   at 
 com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804)
   at 
 com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50)
   at 
 com.webobjects.appserver._private.WOHyperlink.invokeAction(WOHyperlink.java:98)
   at 
 er.extensions.components._private.ERXHyperlink.invokeAction(ERXHyperlink.java:66)
   at 
 com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
   at 
 com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
   at 
 com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:1079)
   at 
 er.extensions.components.ERXComponent.invokeAction(ERXComponent.java:92)
   at com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1357)
   at 
 com.webobjects.appserver.WOApplication.invokeAction(WOApplication.java:1745)
   at 
 er.extensions.appserver.ajax.ERXAjaxApplication.invokeAction(ERXAjaxApplication.java:93)
   at