Hello.

I just tried callbacks for the first time. I wanted to update a modified field every time a data object was changed. In the modeler I added a method called "onPreUpdate" of type pre-update for the entity. Then I added the following method in the data object.

        protected void onPreUpdate() {
                setModified(new Date());
        }

It seem to work very well. Is this the correct way to do it?

In my simple case it would have been even nicer if the _MyEntity.java included something like "protected abstract void onPreUpdate();" generated from the model. Default MyEntity.java should include an emty stub for that method.

Would that be a reasonable feature request? I am asking before registering as I am such a callback newbie.

In modeler, the difference between callbacks and listeners are a bit confusing. Anyone having some ideas to how this interface could be clearer/simpler?

Regards,
 - Tore.

Reply via email to