orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
517 stars 221 forks source link

Unify edit/view pages #2999

Open ebruchez opened 7 years ago

ebruchez commented 7 years ago

A number of existing issues are caused by the fact that the edit and view modes show two different pages, and navigating between the two loses state:

We also have a +1 from customer for keeping the state of a custom instance.

What could we do to fix this? Currently, changing mode causes an internal HTTP POST via the tryChangeMode function. We pass form-version and data-format-version. We also pass fr-noscript, fr-language and orbeon-embeddable as needed.

The reason we do a POST is that in effect, the view mode is exactly the same form as the edit mode, but with "static readonly" controls and the instance marked as readonly.

Now say we do not use an internal POST to change mode: what is the alternative? Staying with the same XForms document, and:

Can we see any drawback to this besides the implementation effort?

avernet commented 7 years ago

+1 from customer as this creates unnecessary calls to services, in particular for the autocomplete control.

ebruchez commented 1 year ago

There is also the question of data permissions:

This particular issue can be solved by securely forwarding data permissions between mode changes.