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 184.108.40.206 to 220.127.116.11 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 :)
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 18.104.22.168 is an inconsistency in 22.214.171.124, since it will result in unpredictable behavior as you won't no from which context / rights you are viewing the objects.
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?