cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stewart, Gary" <>
Subject CForms: Updating all instances of a widget in a repeater
Date Thu, 06 Apr 2006 10:54:59 GMT
Hi there,

I've got a repeater with two selection lists in; staffmemeber and staffrole. Upon a value
being changed on the staffrole or another selection list outside of the repeater (department)
the list of staff members change. I'm using an on-changed-value on the staffrole repeater
and that works fine but I'd also like to change the list if the department is updated for
all the rows in the repeater using javascript on the department's on-changed-value event.

I tried something like:

var staff_list = event.source.parent.lookupWidget("stafflist").getChildren();
var staff_item = null;
var staff_member = null;
var staff_role = null;
	staff_item =;
      staff_member = staff_item.lookupWidget("staffmember");
      staff_role = staff_item.lookupWidget("staffrole");
	//set a new staff member event

but I got stuck at the first hurdle. That is that it looks like stafflist doesn't actually
have any children (hasNext() returns false). It certainly should have. If it does have children
is it then possible to do the latter logic of getting each child and looking up the components
I want to get the value of and change the values of? 

Is there a different or better way that I should do this?



The information contained in this message may be confidential or 
legally privileged and is intended for the addressee only. If you 
have received this message in error or there are any problems 
please notify the originator immediately. The unauthorised use, 
disclosure, copying or alteration of this message is 
strictly forbidden.

If you work for NHS Lothian and wish to have help to stop smoking, support is available by
contacting or 0131 537 9494  - internal 49494.  For anyone
else living/working in Lothian, please contact 0800 848484 for your nearest NHS stop smoking

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message