Java change object attribute value

How can i in Java change an objects value without having to commit it to the db. I only want to change it in the memory. I want to set in a java action an id which is set when an object is created however i do not want to commit this until the user has pressed save. I have tried using this line of code: object.setValue(this.getContext(), attributeName, value); It does not throw out any errors and seems to change the field however this is not being displayed on the screen when the form is opened. I need some way in the java to change the cache object not the db object before it gets committed.
2 answers

You have to use Core.change ( to update the object in the cache too. If you don't use that then you'd have to commit first or return the object from your java action and show that.

Then refresh like Herbert says.


Hi Simon, Most likely you have to let the framework now that the object has to be refreshed in the client (the Java way of the refresh in client check box). You can do that within an action with:


An easier way for changing members is to use the proxy's, generated by the framework. If your object is a Person for example you can do something like this: Person person = Person.initialize(object); After that you can use the person.set and person.get functions.