Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

default value on radiogroup

$
0
0
Hi,

like said in title I have a radiogroup with a dynamic list of objects, and
i'd like to put a specific default value to it, but contrary to a simple
radiogroup with literal values, It doesn't work.

I have :

<t:RadioGroup t:id="contactsRadio" t:value="selectedContactDto"
t:encoder="contactDtoEncoder">
<t:Loop t:source="selectedClient.ContactList" t:value="contactDtoLoopValue"
t:formstate="ITERATION">
<t:Radio t:id="radio" t:value="contactDtoLoopValue" />
<t:label for="radio">${contactDtoLoopValue.nom}
${contactDtoLoopValue.prenom}, ${contactDtoLoopValue.mail}</t:label>


</t:Loop>
</t:RadioGroup>

and in the controller :

public Object onValueChangedFromSelectClients(ClientDto selectedClient) {
for (ContactDto contactDto : selectedClient.getContactList()) {
if (contactDto.isPrivilege()) {
selectedContactDto = contactDto;
break;

return formZone.getBody();

but still, the chosen default value is never selected by default, I have
the last displayed radio selected instead. Why ?

Viewing all articles
Browse latest Browse all 5648

Trending Articles