On Tue, Feb 03, 2004 at 05:50:03PM +0000, Simon Hutchinson wrote:
I am populating a woody selection-list dynamically but have been unable to find a way of making a particular item in the list the initial "selected" item . Could someone please point a beginner in the right direction ?
Set the value of the widget from your flowscript. See cocoon-2.1\src\blocks\woody\samples\flow\woody_flow_example.js for an example of how this is done for the "form1" example.
If you are not using flowscript, this can also be done from Java code: cocoon-2.1\src\blocks\woody\java\org\apache\cocoon\woody\samples\InitForm1Action.java
--Tim Larson
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Thanks for your help Tim. Setting a default value in flow worked a treat.
form.getWidget("mySelectlist").setValue(myDefaultValue);
Cheers
Si
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
