Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

<h:selectOneRadio>'s <f:selectItem> in a table?  RSS feed

 
lif mantis
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i'm trying to put the <f:selectItem> of a <h:selectOneRadio> in seperate <td>s in a table.

in plain html this would do the following:



how do i do the same with <h:selectOneRadio>?

i need this because i need to make the background behind one radiobutton green, and red behind the other one.

please no "pointer in the right direction", just working code.

i already put a lot of work into this until i became too frustrated and gave up. my last attempt was to use a <h:inputHidden> that had the value of the backingbean to be set and onclick javascript code in <input type="radio">s to set the value. this did work in a way (value was set but i still needed to disable the value that wasn't just clicked), but is ridiculously complicated. is there an easier way?

thanks,
lif
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

please no "pointer in the right direction", just working code.

Sorry, Lif. We are not a code mill.
 
lif mantis
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for this comment. fair enough, if you thinks its better to start working from my sample code, please help me fix this tim. personnally i think i'm going in the wrong direction and that there has to be an easier way.

the code below "works" to the point that #{req.approveSelection} is set correctly. what is still missing is code that unchecks the radiobutton that was not just clicked.

here we go, have fun:

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!