File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Nested LazyBean

Whitney Albrecht
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried implementing the NestedLazy Bean from:

However when I try to do something similar to the Order Book bean I get run into errors.

The first problem I run into is that since the customer does not exist (yet) I get a null returned from the following line:
DynaBean customer = (DynaBean)orderBook.get("customer", c);

So then I added a set method before the get;

orderBook.set("customer", c);
DynaBean customer = (DynaBean)orderBook.get("customer", c);

but ran when running the code ran into the ClassCastException error; which is thrown by the get line.

Has anyone been sucessful in using Nested Lazy beans? What am I missing or setting up wrong?

Thanks for you advice in advance.
[ September 09, 2005: Message edited by: Whitney Albrecht ]
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic