This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Notice that it has 3 elements grouped together. When I use the SelectOneRadio I can't get it to render anything more than 1 input element. The following produces all elements before a table element with the table element containing all the radio buttons.
The selectOneRadio generates an HTML table (not an HTML list). The elements within the table are rendered from the f:selectItem child elements.
Members of the "f" tag library do not generate HTML. They may contain data that is used by container elements as part of the container rendering process, as is true in this case, but they don't directly render anything. You'll notice that there are no rendering attributes for selectItem except for the "disabled" attribute.
Simply jamming HTML into the body of the JSF tag won't work. I don't recommend mixing JSF and HTML to begin with, but in this case, the tag is so abstract relative to what gets generated that there's simply no meaningful place to put stuff like that.
There may be SOME hope, though. Try this:
The "escape=false" attribute allows you to use raw HTML in the itemLabel. Unfortunately, this is XML, so you must use the entity escapes or it won't parse properly. Don't forget the ";" that terminates each entity.
An IDE is no substitute for an Intelligent Developer.
Joined: Aug 30, 2011
Yeah this is awful all the way around. Really I don't necessarily have to have a list element I just need a containing box for the radio button and 2 other elements with it. Or even a table that had a row with those 3 elements in the same row might work.
The hard part is getting the radio action where selecting one pops up the others.
There are 2 ways you could deal with this.
1. Apply CSS to set the image elements on each HTML radiobutton element under that control.
Joined: Aug 30, 2011
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How can I display this using SelectOneRadio?