Re: How can I name checkboxes in a table for a javascript?
Re: How can I name checkboxes in a table for a javascript?
- Subject: Re: How can I name checkboxes in a table for a javascript?
- From: Lachlan Deck <email@hidden>
- Date: Fri, 26 Oct 2007 10:25:50 +1000
On 26/10/2007, at 4:47 AM, Kevin Windham wrote:
On Oct 25, 2007, at 11:12 AM, Kevin Windham wrote:
I have a table with checkboxes. The javascript I wrote for this
page disables certain checkboxes when others are checked. I want
to name the checkboxes based on the row and column of the table.
So if I had a 2 row 2 column table the checkboxes would be
name="r1c1" name="r1c2", etc.
I know I can bind the index of the WORepetition to a variable to
get the row number, but how can I get the column number so that my
bound method can return the r1c1 for the name binding of the
checkbox?
I came up with what I though was a solution, but when I bind a
method cbName to the name attribute of a checkbox, I get this error:
Error:
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [;
0.37.0 = ; } > takeValueForKey()]: attempt to assign value to
unknown key: 'cbName'. This WOComponent does not have an instance
variable of the name cbName or _cbName, nor a method of the name
setCbName or _setCbName
Reason:
[<HuntEntry_Step1 name: HuntEntry_Step1 subcomponents: {0 =
<HSCWrapper name: HSCWrapper subcomponents: null >; 0.37.0 =
<NavMenu name: NavMenu subcomponents: null >; } > takeValueForKey
()]: attempt to assign value to unknown key: 'cbName'. This
WOComponent does not have an instance variable of the name cbName
or _cbName, nor a method of the name setCbName or _setCbName
This message makes me think that WO is trying to assign a name that
it's come up with to a variable named cbName. I want to assign a
name I came up with to the name attribute of the checkbox.
Can anyone explain to me what is going wrong here? Is it that the
name attribute is special somehow?
This will happen during takeValuesFromRequest phase. Simply create a
blank setter method for setCbName.
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden