4 pages of forms....

Hi guys,

i've a question for you.

In my Jsf application i need to upload in a mysql database a genetic experiment.

This experiment is made of 4 pages of forms that user has to compile.

I want to use transaction for suring that experiment was completely updated (the experiment will be stored in 5 different tables).

How can i syncronize all the forms and update once the tables of mysql db with all the experiment's data?

Can you help me with idea or examples?

Thanks very much

[528 byte] By [giubata] at [2007-10-3 2:30:25]
# 1
When in request scope: use batch files. When in session scope: just store the data during session and at the Finish invokes the DB insertion.
BalusCa at 2007-7-14 19:29:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
thanks very much for your reply...but can you give me more details?I'm not very expert....
giubata at 2007-7-14 19:29:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Request scope:

1) Form1: append SQL statements to batchfile

2) Form2: append SQL statements to batchfile

3) Form3: append SQL statements to batchfile

4) Form4: append SQL statements to batchfile

5) At the end of Form4 get SQL from batchfile and execute it.

Session scope:

1) Create wrapper object for Form, like MyForm.

2) In MyBean initialize MyForm myForm = new MyForm();

3) Form1: do myForm.setField1(value); myForm.setField2(value); etc

4) Form2: do myForm.setField3(value); myForm.setField4(value); etc

5) Form3: do myForm.setField5(value); myForm.setField6(value); etc

6) Form4: do myForm.setField7(value); myForm.setField8(value); etc

7) At the end of Form 4 get values from myForm, create SQL statements and execute it.

BalusCa at 2007-7-14 19:29:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...