This is weird.  Are you calling D2W.setFactory anywhere?  The ERDirectToWeb 
principal class should be setting this to an instance of ERD2WFactory for you 
in finishInitialization()

Ramsey

On Dec 7, 2011, at 1:17 PM, James Cicenia wrote:

> Ok -
> 
> I have all the rules set and I think it is trying to run the ExcelPage... 
> because if I turn off templateNameForExcelListPage I dont' crash!
> 
> Here is what I am getting:
> 
> <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception 
> occurred while handling request:
> java.lang.ClassCastException: com.webobjects.directtoweb.D2W cannot be cast 
> to er.directtoweb.ERD2WFactory
> 
> What did I miss?
> 
> Thanks
> James
> 
> 
> On Dec 7, 2011, at 11:41 AM, David Holt wrote:
> 
>> You need to have an entity assigned to the page configuration.
>> 
>> You probably are used to the default assignments doing the work for you, but 
>> if your entity isn't PortfolioProject the default assignment won't be able 
>> to interpret "ListPortfolioProject" correctly.
>> 
>> Is this an array of EOs?
>> 
>> 
>> On 2011-12-07, at 9:34 AM, James Cicenia wrote:
>> 
>>> I am trying to do something like the following:
>>> 
>>>             ListPageInterface lpi = 
>>> (ListPageInterface)D2W.factory().pageForConfigurationNamed("ListPortfolioProject",
>>>  session());
>>>             EOArrayDataSource ds = new EOArrayDataSource(null, 
>>> session().defaultEditingContext());
>>>     ds.setArray(reportItems);
>>>     lpi.setNextPage(this.context().page());
>>>     return (WOActionResults)lpi;
>>> 
>>> but it crashes on pageForConfigurationNamed ...
>>> 
>>> 
>>> 
>>> [2011-12-7 11:32:24 CST] <WorkerThread0> 
>>> <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception 
>>> occurred while handling request:
>>> java.lang.IllegalStateException: Couldn't find the dynamic page named 
>>> ListPortfolioProject in your DirectToWeb model.
>>> [2011-12-7 11:32:24 CST] <WorkerThread0> java.lang.IllegalStateException: 
>>> Couldn't find the dynamic page named ListPortfolioProject in your 
>>> DirectToWeb model.
>>>     at com.webobjects.directtoweb.D2W._dynamicPageNamed(D2W.java:975)
>>>     at 
>>> com.webobjects.directtoweb.D2W.pageForConfigurationNamed(D2W.java:966)
>>>     at com.tos.reports.ReportPickConfig.runCustom(ReportPickConfig.java:268)
>>> 
>>> What am I missing?
>>> 
>>> Thanks
>>> James
>>> _______________________________________________
>>> 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/programmingosx%40mac.com
>>> 
>>> This email sent to programming...@mac.com
>> 
> 
> _______________________________________________
> 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/rgurley%40smarthealth.com
> 
> This email sent to rgur...@smarthealth.com

 _______________________________________________
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

Reply via email to