| |

VerySource

 Forgot password?
 Register
Search
View: 879|Reply: 8

Teach checkbox problem

[Copy link]

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-3-21 11:00:01
| Show all posts |Read mode
<table>
       <logic: iterate id = "skill" name = "skill">
        <tr> <td>
                               Ranch
<input type = "checkbox" name = "skill" value = "<bean: write name =" skill "property =" categoryValueId "/>">
 <bean: write name = "skill" property = "categoryCode" />

          </ td> </ tr>
         </ logic: iterate>
        </ tbody> </ table>

Several checkboxes, after selecting a few to submit to background processing, how can I ensure that the selected mark is still there when I return to this page?
I use struts
Reply

Use magic Report

0

Threads

11

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 Invalid IP Address

Post time: 2020-6-29 19:00:01
| Show all posts
You only use the struts tag instead of the action form and action in the mvc mode, so whether a checkbox can remember after submission can only be done by yourself, struts will not automatically complete any work for you.
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-8 09:00:01
| Show all posts
There is a skill value in the actionform, which is not corresponding
Reply

Use magic Report

0

Threads

11

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 France

Post time: 2020-7-10 12:00:01
| Show all posts
You should use the <html:checkbox> tag of struts instead of the html tag of <input>
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-24 15:30:01
| Show all posts
Now it's ok, I use javascrpt to realize it in the interface
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-25 20:30:01
| Show all posts
Isn't this very simple, use the label, when you return, it will automatically go to the form
Reply

Use magic Report

0

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-7-26 00:15:01
| Show all posts
Yes, there is no need to use js. The label corresponds to the form
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-26 08:30:02
| Show all posts
Skill is a character array type that can’t automatically correspond, it seems to have to be processed with js.
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-27 22:45:01
| Show all posts
This problem is not easy to solve with js, you did not consider the real-time update of the data, your js solution is actually to put the selected checkbox on the page in the background, and then return to the page. If there are more at the same time If a machine operates the same data, your operation will be in trouble.
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