¿Ves algo que mejorar? Propón un cambio.
Motivation
You have a very large form and your initial load times are very long. You want to be able to break a large form into multiple forms.
Method
To get the first part of a large form to load we will break the form into multiple parts and only load what appears to be the first tab of a multi-part form. When the user selects the second tab we will save all the data on the first tab and load the second tab. This way if the user want to only make a simple change to the form only the logic for a single tab needs to be loaded.
Example
We will use a series of triggers that are styled as file tabs. Each trigger will perform two actions: it will run a save submission and it will then load the next part of the form. The forms will be styled so that it will appear to the user they are just changing tabs.
Here is the sample code from each of the triggers:
appearance="minimal" class="tab2">
Part 2
ev:event="DOMActivate">
submission="save"/>
resource="edit-2.xhtml" show="replace"/>
Where this page came from
This page was imported from Wikibooks. From “XForms” on Wikibooks, by its contributors, under CC BY-SA 4.0. Changed here: set as a page; navigation and edit links left out; each image under its own licence, credited in its caption.
Nobody has written it yet — it is the source material at a new address, which is why search engines are asked to skip it and why no one earns from it. It is up for grabs: take it on, and it is yours to rewrite and to earn from.
En estas publicacionesXForms
Licencia: CC BY-SA 4.0 · Adaptado de en.wikibooks.org
1
0
0
0

Comentarios






