Where answers come from

Some pages can ask a language model questions. Set this up once; your choice is remembered in this browser for the whole site.

Model source
Use another source instead
You sign in on OpenRouter; it gives this page a key for your account.

A Grails WebFlow observation

Originally published .

Objects created and persisted either explicitly or implicitly to the flow context must implement the java.io.Serializable interface. But, closures can not be serialized. That means that any class that uses a closure such as constraints will probably have to do custom serialization. This is very easy to implement in Groovy since all objects have a properties map and maps can serialize. Just be certain to pick the right keys to serialize.

I’ve noticed that even objects created by the onChange event handler may end up serialized if the change happens inside an action node of a WebFlow.

EDIT: I stand corrected. It is much easier to mark the closures with transient instead of just def. This just works and requires no further thinking. I should probably put this in an example somewhere.

Explore the map · Browse by topic and date