Hi Markus,

Set your "capacity" value before rendering.  You have:

<t:radiogroup value="capacity">

This gets/sets the value of the radio group.

mrg


On Mon, Jan 23, 2012 at 8:06 AM, Markus Grell <tapes...@military.de> wrote:
>> On Mon, 23 Jan 2012 10:29:20 -0200, Markus Grell <tapes...@military.de>
>> wrote:
>>
>>
>>> Greetings!
>>>
>>>
>>> It looks like as if I'm blind,  but i just can't find it:
>>>
>>>
>>> How can I preselect a radio option in a radio group?
>>>
>>
>> Set the desired value to the edited property before rendering. This works
>>  for every form field component.
>
>
> Sorry, I don't get that :-(
>
> I have the following in my template:
>
>
> <t:radiogroup value="capacity">
> <t:loop source="capacityValues" value="currentCapacityElement">
> <t:label for="radio"/>
> <t:radio t:id="radio" value="prop:currentCapacityElement"
> label="prop:label"/>
> </t:loop>
> </t:radiogroup>
>
> In the Java file:
>
> ...
>        public List<Object> getCapacityValues() {
>        return crudService.findWithNamedQuery(Capacity.ALL);
>
>        }
>
>        public String getLabel() {
>                return currentLeistungElement.label;
>        }
> }
> ...
>
> The possible values for the Radio group are pulled from a database.
> Which radio button should already be selected when the form is displayed
> (i.e. pre-selected) is pulled from another table. (It's a 1:n relation,
> nut I think that doesn't matter here).
>
> Where do I have to do what you did suggest above?
>
> Markus
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to