Package com.axelor.meta.headless
Class FormState
java.lang.Object
com.axelor.meta.headless.FormState
Everything a
FormSession holds between two requests: which form, the record tree and its
open lines, the steps and where the run is in them, and the open question with what to do with
each answer.
Kept as JSON: toMap() gives it as maps, lists, strings, numbers, booleans and nulls,
which any JSON mapper writes, and fromMap(java.util.Map<java.lang.String, ?>) takes that back as the mapper reads it. Where
it is kept is the caller's business; HeadlessForms.restore(com.axelor.meta.headless.FormState) turns it back into a session.
It holds no entity and no view definition: the spec is built again on restore.
-
Method Details
-
question
The open question, when the session is suspended; null otherwise. -
toMap
The state as JSON values, for any JSON mapper to write. -
fromMap
A state from whattoMap()gave, as a JSON mapper reads it back.- Throws:
IllegalArgumentException- when the map is not a form state
-