mardi 2 février 2016

load and save data struts2

I need to load some data from a table to show in a JSP page.

Then, when the user pushes on a button, they'll send the form to save in a database.

I wonder if I can create a method to load the init data only (I don't want to call the method execute, which will save the data).

I've tried it with implements Preparable but it calls execute method. In Struts2 I have a method called init to load data but I can't do it in Struts2.

What should I do, create an action to load data (loading with execute method) and another action to save data?

Aucun commentaire:

Enregistrer un commentaire