I am using primefaces selectOneButton. I want to make some buttons in that selectOneButton differently styled from others depending upon some backing bean value. Forexample text of 3 buttons in selectOneButton needs to be bold and that of remaining needs to be normal.
Is it possible?
Primefaces 3.2
There is no “standard” way to do this. The common workaround is to have multiple elements –
SelectItemin your case – that are styled differently – and use an expression with therenderedattribute to determine which ones are visible. This works for any component library, not only primefaces.EDIT : have tried it right now – looks like I cannot influence the styling of the selectitems at all – at least not declaratively in the page. One could try tweaking the theme or overriding the primefaces selectors with custom styling using
!importantrule. But you would still not get distinct styling for the selectitems.So please excuse my former confidence and regard this answer as a “No, you can’t”.