• 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

how to get committed values from database in structs

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friends,

i am using structs 1.2.9.

i am having one jsp page called department.jsp. In this i am having two tables, first table contains fields like dept id,name etc and two buttons save and clear.
through this save button i am storing the data into the database. The other table is to display the records from db.

Now i need this to be done:


After pressing the save button ,the records will get stored in the db. once it is stored i need this new record also to be updated in the second table

ie. it should to be reload with the newly added records. whether i can achieve this in structs, if so how can i do. help me out in this.


Thanks in advance.
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seems like there is a new framework structs

I don't think this is a big issue. When a user presses the save button, do you post the form or make an ajax request to send the data for saving?? If it is an ajax request, then the code that you call, must return the text for the new row and you can use normal DOM manipulation to add that row to the second table. If you post the form on click of the save button, then it is not a problem at all, the next time you display the table, it will get all the records from the database so that record will also come and get displayed in the JSP...
 
viji narasimhan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all thanks for your reply.

No, once i have clicked the save button it should reload with the new record.Not after refresh or for the second time.



 
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This thread would sit better in another forum. Moving.
 
viji narasimhan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey i need to submit this module within two days.

i am newbie to structs

can anyone suggest some references for developing structs application where i can find some business logic implemented.

moreover which framework is best for persistence ibatis or hibernate for structs?

or without using any framework can we have connection codings in action class. any reference for this type struct application(without having any additional framework for persistence).
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Struts. Not "structs".

moreover which framework is best for persistence ibatis or hibernate for structs?


Neither is "better", they're just different. Head over to the ORM forum if you want to discuss which might be best under your circumstances. Either will take longer than two days to learn effectively.

I'm not really sure what the issue is--you just need to reload the data to display the list of records? Why wouldn't you just do it the same way it's being done now?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic