06. juli 2009 - 17:00Der er
5 kommentarer og 1 løsning
How to fill in a form with struts when returning to it?
Hello!
I think I'm missing something fundamental in Struts, but I can't figure out what.
What I want to acomplish is that a form should be filled in with values from previous submit.
To illustrate this I got this silly example:
Suppose the following, a user fills in a form with the following textfields: car brand: "Ford Mustang" number: 1 The user submits the form A page is shown: Ford Mustang with number 1 created
Now the user is supposed to submit 100 "Ford Mustang".
Then it would be great if the user after the submit could return to the form with the previous submitted data already filled in and just change the number 1 to 2, submit the next one and so on.
To return to the previous form I need a link. I also hope that that link can use javascript history.back();
So if any one got any experience about this with Struts, please let me know.
Virksomheder er på vej fra store sprogmodeller, der svarer på spørgsmål, til AI-agenter, der kan udføre opgaver på egen hånd. Det gør teknologien mere nyttig – og langt mere risikabel.
I do insist that you should give a svar so I can reward you.
It seems like I had to solve it with using the session.
I never got it to work with just using the request.
How ever right now everything works as it should, accept one thing, see my next topic: "How to tell from what request user comming from (in this situation)?"
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.