• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

design advice required

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
Iam having Forms in which I have to take some data that is numeriacal data
and submit it in to my Database there r near about 10 forms that
r linked one to other and last one check the totals for all...
basic thing is this all forms r having near about 100 fields
condition is this if all conditions satisfy of totals in form 10th
than insert all values to database means data of all forms 1 to 10.
.more clear is one user willl have this all forms in one session
Iam using JSP and javabeans. .javascript
Is there any sugesstion in design frame work which make it easy and accurate....
regds
 
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
You can keep the form values in session variables until you reach the last form. Then once the condition satisfies, you can call the bean method which has SQL query to update the database.
You can have Info class which will hold the form field values and instatiate the same and put it in the session.
When you reach the last form or page send this info bean to the method which updates the database. In the bean method, extract the values from the info bean and use it in the SQL query.
Cheers.
 
madhav lakkhani
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thx for answer
C i think that if i will put 100 multiply 10 that is 1000 values in session b4 submiting to database it will take too much of client memory as well as lot os server network traffic for every request ..
pls suggest much more
regds
 
L Goundalkar
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Since you have too bulky data, you can have two approaches.
1. Try to save the data on the client side, i.e. either using cookie or using an XML file. But This may fail if user disables cookies.
2. Since you have session id of the user, you can store the data in a temporary xml or text file ( convinient to you..) on the server for every submit in the page. So my temporary file will be named using the session id and will be appened for every page submit with the page field values.
Once the user submits on the last page then you can send the file from client i.e. read the cookie value or fetch the file on the server itself depending on the above two scenarios and update the database.
Hope this helps.
Cheers.
 
madhav lakkhani
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thx for u r answer ..
iam going to try this approach but not much positive abt
regds
 
L Goundalkar
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am not sure about sending the XML or formatter text file from server to client. Try out the Session one. Its easy to implement.
Write a bean which appends the data to a file or xml and for every submit on the page pass the values to the bean from your server side scriplet.
Then for the last one invoke the bean method which reads the file from your server and updates the database.
I think its easy to implement.
Cheers.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic