Send form's data to another view/page

Hello,

My company has bought this usefull product and i have some troubles into understanding how to build a complete aplication.

My question is : how to manage to send data from a view to another one?
More precisely : i have a form with some inputs but how to change the current page when the submit button is clicked and send data to this page?

I checked samples but they only provide a static presentation of each components and i would like to know how to build a whole application with a lot of different pages/views.

Thanks a lot.

How many screens you plan to use in the app?
If it is about 10-20 screens - the best solution will be to use multiview as top level element, define all views inside, and switch the visible one, when necessary - it will result in much better user experience than reloading each page from server side.

Now you can send data to server by ajax, through

dhx.ajax().post(“some.php”, form.getValues());

In next version we will add ability to send data by native form submit, but still it must be considered as secondary solution, because it has not any great advantages over ajax saving logic.

Hello Stanislav,

Well, we plan to use a lot of screens : i cant tell you the exact number of screens because this app is develloped jointly by 2 of our european business division.

I think that your propositions can solve my problem : switching between views and ajax.

Is there a way to define each view of a multiviews separately (each view in a file)?

Thanks.

Is there a way to define each view of a multiviews separately (each view in a file)?
Yes, you can define a view in separate js files as raw configuration object

var viewa = { ... internal config here; }

and later include all js files and use something like

{ view:"multiview", cells:[ viewa, viewb ... viewn ]}

The more tricky scenario will be adding view ( or replacing existing ones ) dynamically.
Check
samples/ui/template/03_ajax_ui.html
it shows as content can be replaced dynamically with new one.

Its perfect!
Thanks for your support.