Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Want a Default Selected Radio Button. What to Do?  RSS feed

JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to show a default selected radio button when the web page is loaded for the first time. Normally, I create a set of radio buttons this way:

To show a default selection, I can add a statement in my backing bean
where "imports" is the value of one of my buttons. Then, I display the web page this way:

The problem is that whatever the radio button that users actually select, its value is assigned to the defaultSelectedDataTransferType.

I want the dataTransferType gets the value of the button that users select. What should I do?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!