log.debug("manufacturingSchedule.scheduleDescription"); executes just fine, but log.debug(aOrderItem.orderQuantity()); on the other-hand gives me a null pointer. Obviously aOrderItem.Part() is going to be null as well.
The problem is aOrderItem is null, and I don't understand why.
Also, here's a simplified version of the code without the casting:
public WOComponent addOrderItemToSchedule() { ec = session().defaultEditingContext(); log.debug("OrderItem to Schedule: "+aOrderItem.part().partName()); manufacturingSchedule.scheduleOrderItem(ec, aOrderItem, quantityToSchedule); return context().page(); }
On Apr 10, 2007, at 8:51 AM, Daniele Corti wrote: 2007/4/10, David Avendasora <email@hidden>:Okay, I added a setQuantityToSchedule method, but I still get the NullPointerExeption.
Here's the method I'm actually calling in the action binding of the WOSubmitButton:
public WOComponent addOrderItemToSchedule() { ec = session().defaultEditingContext(); log.debug("OrderItem to Schedule: "+aOrderItem.part().partName()); ((ManufacturingSchedule)manufacturingSchedule).scheduleOrderItem(ec, (OrderItem)aOrderItem, quantityToSchedule); return context().page(); }
I get a NullPointerException on the log.debug statement, or if I comment it out, on the scheduleOrderItem() call. So you have 2 problems: manufacturingSchedule is null, and or aOrderItem is null or aOrderItem.part() is null
|