Adding Direct2Web technologies to existing projects
Adding Direct2Web technologies to existing projects
- Subject: Adding Direct2Web technologies to existing projects
- From: Joe Little <email@hidden>
- Date: Wed, 24 Jun 2009 16:32:30 -0700
I enjoyed David's screencast of the D2W tech in action, and I think if
nothing else, its the way to easily generate random Excel spreadsheets
since rules will always trump code when dealing with the daily whims
of management. I've been able to replicate his example as long as I
have my model local to the project and not in a framework. Further,
David and I thought my issues may be related to not having a Wonder
generated source files from the model, but I have since made a
separate model framework using _WonderEntity.java and
WonderEntity.java for my eogen.
The problem is that whenever I try to load in a D2W dynamic page, I
get the likes of this:
[2009-6-24 16:17:32 PDT] <WorkerThread0>
<com.webobjects.appserver._private.WOComponentRequestHandler>:
Exception occurred while handling request:
java.lang.IllegalStateException: Couldn't find the dynamic page named
ListExcelApplicant in your DirectToWeb model.
[2009-6-24 16:17:32 PDT] <WorkerThread0>
java.lang.IllegalStateException: Couldn't find the dynamic page named
ListExcelApplicant in your DirectToWeb model.
at com.webobjects.directtoweb.D2W._dynamicPageNamed(D2W.java:975)
at com.webobjects.directtoweb.D2W.pageForConfigurationNamed(D2W.java:966)
at edu.stanford.ee.facultysearch.reports.components.Main.exportAsExcelAction(Main.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
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 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 com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1357)
at com.webobjects.appserver.WOApplication.invokeAction(WOApplication.java:1745)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedPage(WOComponentRequestHandler.java:206)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:298)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
at com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:369)
at com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:442)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
at java.lang.Thread.run(Thread.java:637)
[Deprecated] Xalan: org.apache.xpath.operations.WOExceptionPage
Its like it cannot find my model in any way. The project already is
correctly display a table looping through my data, so I know the build
path and such are fine. This all works:
public NSArray<Applicant> applicants() {
if (_applicants == null) {
_applicants =
Applicant.fetchAllApplicants(session().defaultEditingContext());
}
return _applicants;
}
Adding the model and source to the project locally tends to resolve
the issue with D2W, but that just seems wrong :(
Any clue on how the dynamic pages should be generated? Could it be
something to do with the imports that WOLips found, even though I'm
binding to ER's D2W as well?
Here's the relevant main.java imports:
import com.webobjects.directtoweb.D2W;
import com.webobjects.directtoweb.ListPageInterface;
import com.webobjects.eocontrol.EOArrayDataSource;
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden