cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Kratz" <markuskr...@googlemail.com>
Subject Re: Cforms JavaSelectionList default entry
Date Mon, 30 Jul 2007 11:56:46 GMT
Works perfect, thanks :)

2007/7/30, Robby Pelssers <robby.pelssers@agp.nl>:
>
>  Quite easy,
>
> Suppose you create a *StaticSelectionList *
>
> you can iterate over your resultset and call addItem(Object value)
>
> Then on your Field (widget) you add the selectionlist  *setSelectionList<http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/forms/formmodel/Field.html#setSelectionList%28org.apache.cocoon.forms.datatype.SelectionList%29>
> *(SelectionList<http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/forms/datatype/SelectionList.html>
>  selectionList)
>
> You can define a default value in your formdefinition or just call
> setValue(defaultvalue) of the Field(widget) after the form is loaded.
>
> Hope this answers your question.
>
> Cheers,
> Robby
>
>
>  ------------------------------
> *Van:* Markus Kratz [mailto:markuskratz@googlemail.com]
> *Verzonden:* maandag, juli 2007 13:13
> *Aan:* users@cocoon.apache.org
> *Onderwerp:* Cforms JavaSelectionList default entry
>
> Hi,
>
> I want to create a dynamic JavaSelectionList out of the database. But how
> can I define a default checked button without JavaScript, which is selected
> when the form is loaded the first time?
>
> Best regards,
> Markus Kratz
>
>

Mime
View raw message