According to ND Docs, CSpSelectable.clear() should reset it to the
default values. However, I don't see it happening with RadioGroups.
If the default entries were coming from the database, *doAutoFill()*
before *addSelectable()* would work.
In your case, it seems the default values are static. In that case I
think *removeAllChildren()* followed by a number of *addSelectable()*,
including those static ones is the best you can do.
Aby
-----Original Message-----
From: Roach, Nathan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 09, 1999 2:42 PM
To: '[EMAIL PROTECTED]'
Subject: [ND] Problems with Radio Buttons(2)
-----Original Message-----
From: Roach, Nathan
Sent: Thursday, September 09, 1999 4:38 PM
To: 'Curt Springer'
Subject: Problems with Radio Buttons(2)
well, I tried addSelectable first, but I ran into the unfortunate
circumstance of addSelectable executing each time the page is reloaded.
So,
if a user clicks on the reload button in their browser five times, I
wind up
with five more identical items in my radio button group.
nathan
-----Original Message-----
From: Curt Springer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 09, 1999 4:32 PM
To: Aby Mathew
Cc: 'Roach, Nathan';
[EMAIL PROTECTED]
Subject: Re: [ND] Problems with Radio Buttons
At 02:17 PM 9/9/99 -0700, Aby Mathew wrote:
>The problem is that
> >>
>*protected* CSpSelectable createNewSelectable(CSpValue value,
> String label)
><<
>is *protected*. May be, meant for ND's internal use or when we subclass
>the 'CSpStuff'.
>
>Fortunately, there is
> >>
> public void addSelectable(int index,
> String label,
> CSpValue value) throws
>ArrayIndexOutOfBoundsException
><<
>It works though with the unpleasant limitation that you can't append
>something to the end of the list.
Actually, there is a signature that doesn't take the 'int index'
argument,
and it does append to the end of the list.
-- Curt, Team ND
>Aby
>
>-----Original Message-----
>From: Roach, Nathan [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, September 09, 1999 1:24 PM
>To: [EMAIL PROTECTED]
>Subject: [ND] Problems with Radio Buttons
>
>
>
>I am trying to add an entry to a radio button group and it isnt working
>properly. It is probably developer error so I'm hoping that someone
>can
>tell me what I'm doing wrong.
>
> I have a radio button group called rbQueries. It contains two
>hard-coded
>entries : one for Daily volumes and one for Montly volumes. I want to
>add a
>dynamically generated radio button for the hourly volumes. So, I was
>looking at the NetD class definition for
>spider.visual.CSpRadioButtonsGroup.
>Under the methods index, there is this entry:
>
>createNewSelectable(CSpValue, String)
>Instantiates and returns a new selectable radio button which is a
child
>of
>this radio button group
>
>so, in my code I added:
>
> CSpRadioButtonsGroup radiog = (CSpRadioButtonsGroup)
>getDisplayField ("rbQueries");
> CSpValue newentry = new CSpString("Hourly");
> radiog.createNewSelectable (newentry, "hourlyvol");
>
>What puzzled me is the error returned:
>
>Compiling pgCustomerMenu.java...
>C:\NetDynamics\NetDynamics40\Projects\MeasurementInfo\pgCustomerMenu.ja
v
>a:14
>7: No method matching createNewSelectable(spider.session.CSpValue,
>java.lang.String) found in class spider.visual.CSpRadioButtonsGroup.
> radiog.createNewSelectable(newentry, "hourlyvol");
> ^
>1 error
>Failed compiling Project MeasurementInfo. - 1 error.
>
>any ideas?
>
>nathan
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]