| |

VerySource

 Forgot password?
 Register
Search
View: 921|Reply: 5

Ask a structs question!

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-8 11:30:02
| Show all posts |Read mode
That is, when the action element is configured in struts-config.xml, the specified scope = request, but I want to return to the error screen when the next logical error occurs, and save the user input information. But scope cannot be session. There is no good way.
For example: in an update screen, when the data entered by the user has a logic error, it will still go to the update screen while retaining the user's input information. But need scope = request configuration. Is there any good way, please help prawns!
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-5-28 21:00:01
| Show all posts
Wouldn't it work with javascript?

If you find a logic error, you can go directly to the update page.
Go to another page without logic errors
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Israel

 Author| Post time: 2020-5-29 12:15:02
| Show all posts
Of course, logic errors cannot be handled by javascript. I want to go directly to the update page, but the data entered by the user is lost. Is there any good way to keep these data? My error mechanism is not to specify the input element in the action. Instead, go to the update screen by throwing a custom exception. consult!
Reply

Use magic Report

0

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-13 23:15:01
| Show all posts
Save the initial value in the session when catching
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-20 15:45:01
| Show all posts
Use ACTIONFORM for temporary storage
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-21 14:15:01
| Show all posts
When you configure FormBean in struts-config.xml, whether it is submitted successfully or failed, the formBean will automatically fill the page, no other methods are needed
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list