Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 8022 invoked from network); 17 May 2007 11:40:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 May 2007 11:40:14 -0000 Received: (qmail 57489 invoked by uid 500); 17 May 2007 11:40:16 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 57177 invoked by uid 500); 17 May 2007 11:40:15 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 57166 invoked by uid 99); 17 May 2007 11:40:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2007 04:40:15 -0700 X-ASF-Spam-Status: No, hits=4.9 required=10.0 tests=FUZZY_MILLION,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of rashel.s@gmail.com designates 64.233.184.236 as permitted sender) Received: from [64.233.184.236] (HELO wr-out-0506.google.com) (64.233.184.236) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2007 04:40:08 -0700 Received: by wr-out-0506.google.com with SMTP id i22so507076wra for ; Thu, 17 May 2007 04:39:46 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=rCI6LBfEZqY/52PA8aLUWWVnITq34LaJ9I/ZUhQ0qk4RPLtiy7qQ93D6+Hb1NowfsvHznXRPJQ5/26YNwoAEAyeDvivlOKrJ2c3cspz219MDzb+RTQfpU6iAr9GJRgP/TRGuPifWa+7jmms7JvYltZmDS/jTUxXq7ylRQba7bOM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=oByetIhDp1WovfBSgzjD2YKwqL8AGpK1KqS4CzqAVLJy9GtHstgRdFfrtrYwvNDlDzJAQATvDU6spPsUZgzjuMP6sVg5yIHR7LQzrk1N5WsGIgct99VkEStkOItOzO0wUG+MmflM8sUdx/fllvk3tQU4zn7RI+EehIVFIOaOYug= Received: by 10.114.75.1 with SMTP id x1mr132270waa.1179401985890; Thu, 17 May 2007 04:39:45 -0700 (PDT) Received: by 10.114.24.18 with HTTP; Thu, 17 May 2007 04:39:45 -0700 (PDT) Message-ID: Date: Thu, 17 May 2007 21:39:45 +1000 From: "Rashel Shehata" To: users Subject: repeater state and children MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_38085_29751643.1179401985793" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_38085_29751643.1179401985793 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, Im having a problem setting the state of a certain child of a repeater . I have a simple repeater defined as: Response Label ..other children Initially the response child is disabled but at some point i want to activate all instances of the response child in the repeater I have tried: widget.lookupWidget("../selection").getChild("response").state= Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE; but i get an error: TypeError: Cannot set property "state" of null i get the same error using widget.lookupWidget ("../selection").lookupWidget("response"). However on trying the method, the response widget is activated for row 0(as expected): widget.lookupWidget("../selection").getWidget(0,"response").state= Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE; how do i activate all instances of the response widget in the repeater. Thanks a miilion ------=_Part_38085_29751643.1179401985793 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi,
 
Im having a problem setting the state of a certain child of a repeater .
 
I have a simple repeater defined as:
 
<fd:repeater id="selection"  >
  <fd:widgets>
  
  <fd:field id="response" required="true" state="disabled">
          <fd:label>Response Label</fd:label>
          <fd:datatype base="string"/>
        </fd:field>
..other children
 
</fd:widgets>
  </fd:repeater>
 
 
Initially the response child is disabled but at some point i want to activate all instances of the response child in the repeater
 
I have tried:
 widget.lookupWidget("../selection").getChild("response").state= Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE;
 
but i get an error:
TypeError: Cannot set property "state" of null
 
i get the same error using widget.lookupWidget("../selection").lookupWidget("response").
 
However on trying the method, the response widget is activated for row 0(as expected):    
   widget.lookupWidget("../selection").getWidget(0,"response").state= Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE;
 
how do i activate all instances of the response widget in the repeater.
Thanks a miilion

------=_Part_38085_29751643.1179401985793--