Re: Radio Button question

2001-05-16 Thread Shane Warne

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

2001-05-16 Thread Nanduri, Amarnath

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

2001-05-16 Thread Shane Warne

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.
html:checkbox property=checkmate disabled=true /
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

2001-05-16 Thread Nanduri, Amarnath

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 ; %
  logic:iterate id=groupsList name=statesBean property=states
html:radio name=statesBean property=selectedIndex value=%=
statesBean.getIndexedValue(i) % /
% i++ ; %
  /logic:iterate

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.
html:checkbox property=checkmate disabled=true /
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

2001-05-16 Thread Nanduri, Amarnath

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.
html:checkbox property=checkmate disabled=true /
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/