How to custom layout h:selectOneRadio

后端 未结 1 928
春和景丽
春和景丽 2020-12-10 08:43

the layout of h:selectOneRadio can either go horizontal or vertical, so is there a way that I can do some custom layout. For example, instead of displaying 8 radio button, d

1条回答
  •  北荒
    北荒 (楼主)
    2020-12-10 09:06

    It's not exactly that, but you could use Tomahawk's with the layout attribute set to "spread" to have a markupless rendering of radio buttons. You can then use to place the individual radio buttons in the markup the way you want, such as in a .

    E.g.

    
        
    
    
    
        
        
        
        
    
        
        
        
        
    
    

    or even when the amount of radio buttons is unspecified

    
        
            
        
    
    

    (note that is not suitable as it runs during view render time and thus end up as a single column of , you'd need to use plain HTML

    instead)

    0 讨论(0)
    提交回复
    热议问题