Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Struts 2.0 check box

 
kiran chirravuru
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I have country list and there is checkbox against each country information. Now users selects all the checkboxes of the countries
which he want to delete but how can i get the countries ids of all the checkboxes that are checked using struts 2.0


Please help me

Regards
Kiran
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want to delete the checkboxes using javascript?? Basically what exactly do you want to achieve?? Can you show us the code that you used to generate the checkboxes...
 
kiran chirravuru
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ankit
I want actually the country id in my action class method so can i get .

Regards
Kiran
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want actually the country id in my action class method so can i get .

Is that a full statement?? If you just want to add id attribute to checkboxes, you can use the id attribute on the checkbox tag. The action actually doesn't need the id, id is needed normally in javascript. The action is actually concerned with the name and the value attribute of the checkbox...
 
kiran chirravuru
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ankit

I want actually the country id in the action method to retrive the country data from database . If i am able to retrieve the country id then i can use it through url in my action class
method .I have generated the country list data using <s:iterate> tag

Regards
Kiran
 
galne vaibhav
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have code in which i have grid an elements in which element gets deleted on checkbox sharing the same



by using this way you can send the values is id
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic