cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: [Cforms] How to reproduce the selection state?
Date Tue, 28 Jun 2005 15:19:01 GMT


Stephan Coboos wrote:
> 
> How can I reproduce the form in order to select "Audi" in the dropdown box
> for cars automatically?

http://cocoon.apache.org/2.1/userdocs/forms/datatypes.html#Selection+lists+%28default+implementation%29

"To set a default selection, just set the value of the widget containing
the selection list."

So this would translate into something like (untested)

  <fb:javascript id="cars" path="cars" direction="load">
    <fb:load-form>
      var selectedCar = getSelectedCar(); // this calls into flowscript
      widget.setValue(selectedCar);
    </fb:load-form>
  </fb:javascript>


HTH,
Jorg


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


Mime
View raw message