aspose file tools*
The moose likes JSP and the fly likes Associating controls in a row with a radio button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Associating controls in a row with a radio button" Watch "Associating controls in a row with a radio button" New topic
Author

Associating controls in a row with a radio button

Markus Neumaier
Greenhorn

Joined: Oct 29, 2013
Posts: 15
Hi,

im Iterating over a XML-File and fill out a Table.

Key Value is always a ID wich i bind to a radio button. In the last column i create an identical dropdown menu for each row. But only the Value in the first dropdownvalue is used. Is there a way to creat a dependency between the radio Button / row and the used Dropdown menu.
I hope the Picture explains what im trying to do.

Thank you

Markus


[DropDown.png]

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60077
    
  65

One of the easiest approaches would be to make sure that all dropdowns except for the one in the same row as the checked radio button are disabled. Disabled controls do not participate in the submission, so only the enabled dropdown would submit its value.

This, of course, would require JavaScript to change the enabled state of the dropdowns as the radio buttons are checked.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Markus Neumaier
Greenhorn

Joined: Oct 29, 2013
Posts: 15
I thought that I had to use JavaScript. Maybe I can change the structure of the whole site.

Thank you for the quick response :)

Markus
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60077
    
  65

Well, you don't have to. But it's likely this easiest approach. You could also do some complicated naming and parsing on the server, but that's so 2003.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Associating controls in a row with a radio button
 
Similar Threads
want to show only rows in dispaly tag in struts page using pagination
Search Datatable , filter the records & display data
radio button using javascript DOM
how to update dropdown menu on radio button click??pls
POI - empty excel rows.