aspose file tools*
The moose likes Struts and the fly likes Problem with Struts 2.0 check box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with Struts 2.0 check box" Watch "Problem with Struts 2.0 check box" New topic
Author

Problem with Struts 2.0 check box

kiran chirravuru
Greenhorn

Joined: Nov 25, 2009
Posts: 26
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

Joined: Aug 03, 2008
Posts: 9321
    
  17

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...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
kiran chirravuru
Greenhorn

Joined: Nov 25, 2009
Posts: 26
hello ankit
I want actually the country id in my action class method so can i get .

Regards
Kiran
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9321
    
  17

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

Joined: Nov 25, 2009
Posts: 26
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

Joined: Nov 30, 2009
Posts: 9
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Struts 2.0 check box