XPages - Radio Button Group in a table

情到浓时终转凉″ 提交于 2019-12-11 18:59:46

问题


I would like to place the radio buttons from a radio button group in different cells within a table. Is this possible?


回答1:


You can set the groupName attribute of the radio button (not radio button group) control to group multiple radio buttons under the same name. Something like this:

<xp:radio text="Label" id="radio1" groupName="MyRadioGroup"></xp:radio>

You can then place these radio buttons at there respective cells in table. On the downside you wont be able to compute the list of items as you can in radio button group.

Another option is you could write your own custom renderer, like in this answer, that would generate the table with radio buttons for you.




回答2:


Yes, totally possible. As long as the HTML "name" attribute is the same then they will be treated as the same group. You can add this to your radio button in the All Properties under "attrs". Give it a name of "name" and a value of something common between radio buttons you want to group.

I am not even sure, that you need to use the Radio Button Group if you don't want.



来源:https://stackoverflow.com/questions/16900447/xpages-radio-button-group-in-a-table

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!