4

I don't often have need for tomahawk components anymore since jsf 2.0 provides great selectOneMenu support and most of other functionality I used to use them for, but when it comes to a selectOneRadio component I don't know of another provider with a layout="spread" option. This is essential from time to time to achieve a certain layout I'm asked for.

I'm using Tomahawk for exactly this purpose but recently discovered some serialization issues caused by this component during failover. I was wondering if anyone has discovered another provider with similar "spread" functionality or if anyone has written/published an alternative based on h:selectOneRadio?

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
Dave Maple
  • 8,102
  • 4
  • 45
  • 64
  • None comes to mind, unfortunately. It's however easy to throw in some JS code to get the individual radio buttons to behave as you want (but that won't work properly on JS-disabled clients). What serialization issues exactly are you facing? – BalusC Jun 21 '11 at 10:57
  • I get index out of bounds exceptions after failing over to another server. Something in the stateholder isn't deserializing correctly. It's definitely solvable at that level if I can figure out what the exact issue is an provide a custom serializer. I just wondered if there was something newer out yet. Tomahawk doesn't seem like a very active project right now. – Dave Maple Jun 21 '11 at 13:10

1 Answers1

0

We also wanted to use the "spread" option - in our case for DDA compatibility (no using tables for layout) but for political reasons were unable to use Tomahawk. We ended up writing our own custom renderer for radio buttons and checkboxes.

It wasn't too hard, took me a few hours to get it working the way we wanted. I'm at home for a couple of days without access to the code base so I can't give you the exact code but it's a pretty simple matter of overriding the encodeBegin() and decodeBegin() (or encodeEnd() and decodeEnd() depending on your usecase) methods and writing the html appropriate for your application.

Steve Atkinson
  • 1,219
  • 2
  • 12
  • 30