Link to home
Start Free TrialLog in
Avatar of nhagiaubungbu
nhagiaubungbu

asked on

List in JSP, with Struts

I make a JSP page, with 2 columns: one is a list of checkbox, one is a list of name. And one button DELETE, like this:
[ ]  A
[ ]  B
[ ]  C
[ ]  D
DELETE
I wanna do this: "I will multi-select the checkbox, and click button DELETE. It will delete the Name that i chosen". So, the question is:

I use the Struts (with ActionForm, Action...) with TOMCAT. If i write the ActionForm like this:
String A
String B
String C
String D
It was ok. But If I wanna write the ActionForm like this:
String checkbox[]
so, how can I map the JSP page with the ActionForm? (map the list of checkbox with list of string). What must i do with the file Struts-config.xml???

If anybody have the source-code, pls submit here and explain for me (if u can)
Thanks alot. I really need to solve this problem. Really
Thanks all.
Avatar of nhagiaubungbu
nhagiaubungbu

ASKER

Thanks, COBOLdinosaur
Hi nhagiaubungbu,

In your form, you can have an array to store what are the values in your checkbox.

I will send you some sample :).

Regards
Dave
ASKER CERTIFIED SOLUTION
Avatar of suprapto45
suprapto45
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hi suprapto45

I will try your code later. But i think it will work :)
Thanks alot.

Regards
BungBu
Hi BungBu,

Glad I could help. Just let me know if you still have problem.

Regards
Dave