RE: Radio Button question
Also see an other posting i made in struts mailing list.. Iterate and Radio tags and follow the thread. It is self explanatory. cheers, Amar.. -Original Message- From: Shane Warne [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 4:08 PM To: [EMAIL PROTECTED] Subject: RE: Radio Button question Amar, The idea's good. But the radio button values have to be set. Like the dbase would hold the values for the radio button or the check box and i have display the disabled radio or checkbox depending on what value is coming from the dbase. We have the property in Struts, i'm not sure whether it works or not ?? Please throw some light.. --Shane __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: Radio Button question
Shane, It works for me. The value in the Radio Button is dynamic. I am at present setting an index for each Radio Button. When the user submits information back, i know what index it is based on the value selected in the Radio Button. I then lookup in the ArrayList on this index and get my correct object to deal with my logic.. In your case you are holding the values of the Radio Buttons inside the database. You might want to call a method with an index and the method will return the value based on the index you send in. A brief example would be.. <% int i = 0 ; %> <% i++ ; %> where the property is the actual value you are trying to compare and value is got from the database... This is not pretty but it serves the purpose whether it is a Radio button or a Checkbox...Struts compares the property to the value. If both match then the checkbox is checked, else the checkbox will not be selected... Hope this helps. Took me a whole day to figure this out and get it working. cheers, Amar.. -Original Message- From: Shane Warne [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 4:08 PM To: [EMAIL PROTECTED] Subject: RE: Radio Button question Amar, The idea's good. But the radio button values have to be set. Like the dbase would hold the values for the radio button or the check box and i have display the disabled radio or checkbox depending on what value is coming from the dbase. We have the property in Struts, i'm not sure whether it works or not ?? Please throw some light.. --Shane __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: Radio Button question
Amar, The idea's good. But the radio button values have to be set. Like the dbase would hold the values for the radio button or the check box and i have display the disabled radio or checkbox depending on what value is coming from the dbase. We have the property in Struts, i'm not sure whether it works or not ?? Please throw some light.. --Shane __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: Radio Button question
Hi Shane , you can doa small hack . Have a Radio Button / Checkbox image. In your iterate tag use the logic:equal tag to find out if it is read only. If read only flag is true, show the image else show the Radio Button. Hope this helps. cheers, Amar.. -Original Message- From: Shane Warne [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 9:30 AM To: [EMAIL PROTECTED] Subject: Re: Radio Button question Amar, I was looking for a similar solution too. I was wondering how do i disable a radio button/ check box when the page to be displayed is just read only.. I can use the normal form elements to get the job done but is it possible using Struts??? Shane.. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: Radio Button question
Amar, I was looking for a similar solution too. I was wondering how do i disable a radio button/ check box when the page to be displayed is just read only.. I can use the normal form elements to get the job done but is it possible using Struts??? Shane.. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Radio Button question
Hi All, Is it possible to set the value of a Radio Button at runtime ? I have an Iterator in my ActionForm containing a list of users. I have to show this list of users to the client. When the client selects on a particular user (aka radio button), and submits the form, i want to set the value in a particular field in the ActionForm. Any suggestions ? I would really appreciate some code if anybody has done something like this...nothing too sophisticated just some simple required lines of code. Thanks.. cheers, Amar..