cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Anderson <benanderson...@gmail.com>
Subject [Forms] broadcastEvent
Date Tue, 05 Apr 2005 19:21:47 GMT
Hi,
I have one text field which, once changed, will populate 2 drop down
lists.  However, the 2nd drop down is dependent on the 1st drop down.

So, I have this in my text field's definition

<fd:on-value-changed>
  <javascript>
...
// this populates the 1st drop down
raIdWidget.setSelectionList("cocoon:/selection-lists/raIds?raSearch=" + value)
// I'd like to get the first value out of this select list.  Is this possible?
// I tried the following line, but it doesn't work... it's still the old value.
// var raId = raIdWidget.value
// Because now I'd like to trigger an event
raIdWidget.broadcastEvent(
  new Packages.org.apache.cocoon.forms.event.ValueChangedEvent(
     raIdWidget,
     raIdOldValue,
     raId));
...

and then in the javascript for the value changed event of the 1st
drop-down, I populate the 2nd drop down.

This seems to all fit together except for the above mentioned gap.  Is
there a way to get a value out of the selection list, even though it
isn't explicitly set?

Thanks,
Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message