Null value when get value from an attribute with out context parameter

Hello there! I usually use get fucnction followed by an attribute name which I want to got value such as System.out.println(objCust.getCustomerName()); System.out.println(objOrder.getOrderAmount()); System.out.println(objOrder.getPaymentTerm()); After I have upgraded modeler from to I did not to used this old code My Eclipse show me the return value of attribute is null, I try to change this command whit context parameter like this System.out.println(objCust.getCustomerName(this.getContext())); That it's work But I have for few questions below 1.This is new interface to get value or This is a bug 2.I have a lot of command to get value. Any advice to implement this if i need to do? Please let me know if I do misunderstand Many thank :)
3 answers

Propbably you didn't initialize /create the Customer Object with a context. If you initialize / create an object with context, you do not need to pass the context in any subsequent calls.

* Updated *

Ok, I see you use the initialize methods a lot (line 117, 140, 144, 179). You should pass your context as first argument to them. That will avoid the need to pass context during the get/ set calls.

That you did not need the context in is an inconsistency in, since it will result in unpredictable behavior as you won't no from which context / rights you are viewing the objects.


Hi Michel,

In ordinarily, I used standard method to create/edit. One page contained a datagrid with a button to open a new/edit form This method do use automatically context,don't it?

Thanks a lot :)


Of course,I can do for you.They are below

CreateCustomerTextFile_2.5.5.1 as

CreateCustomerTextFile_2.5.6 need to pass context .java

You're very kind. :)