163
Views
5
Comments
Want to show labels of static entity in radio buttons group in Reactive
Question

Hi Team,

I want to show labels of static entity in radio buttons in reactive web . In tradtional web , it is easily feasible to do this by using GetStaticEntity() server action. But this is not possible in reactive. So i don't wanna use any hard coded values to show the label. Please suggest a way out.

2020-11-13 07-48-15
Khuong Truong

Hi,

I think you can try this:


Regards,

Khuong

2021-09-06 15-09-53
Dorine Boudry
 
MVP
UserImage.jpg
vikas sharma
Champion

Hi,

Sorry may be not getting your question correctly. But if you want to show the static entities label anywhere in UI why you don't create one aggregate of static entity and then from aggregate show it in list. In list item you can create one radio button and assign label to this button dynamically.

regards

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi @Vikas Sharma ,

because that is not something you can do in Reactive, the radio button only lives inside a radio group, and you can't add a list in a radio group.

The solution the forge component I linked to is using, is to have a list of radio groups, each with only one option in it, and all linked to the same Variable.  

I personally would probably just use that pattern directly and not use a block, to avoid having to deal with an extra event handler in my code, but that's a matter of personal taste.

Dorine

UserImage.jpg
Peter Delrue

Hi Dorine, 

I used this solution (directly in code) and it workes fine BUT how to check mandatory?
Al my radiobuttons (that are not selected) get the message Required Field. (not completly visible on my screen)

Peter

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.