You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Russell Simpkins <ru...@hotmail.com> on 2009/07/07 03:07:00 UTC

Radio button question

All,
I want to display a radio button of options with an associated image e.g.
<input type="radio" name="selectone" value="1"><img src="img_vala.gif" ..><input type="radio" name="selectone" value="2"><img src="img_valb.gif" ..><input type="radio" name="selectone" value="3"><img src="img_valc.gif" ..>
And have those values driven from my Model. I feel caught somewhere between RadioGroup and RadioList but I'm not sure how to pull this off because RadioGroup documentation seems to suggest that I have to have wicket:id= for each radio option, and I won't know how many options since its database driven. RadioList does the radio options fine, but I can't figure out how to render the image.
I am using a RadioList and an implementation of IChoiceRenderer. I tried adding the image html to the getDisplayValue method, but the image would not render.
I'm still new to Wicket so I may have missed this in the docs, if so feel free to paste link to any example or doc that I should have read closer :-)
Thanks in advance,
Russ
_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009

RE: Radio button question

Posted by Russell Simpkins <ru...@hotmail.com>.


> From: igor.vaynberg@gmail.com
> Date: Mon, 6 Jul 2009 19:10:22 -0700
> Subject: Re: Radio button question
> To: users@wicket.apache.org
> 
> the example of radiogroup in wicket-examples/component reference
> demonstrates a radio group with a variable amount of radios.
> 
> -igor
> 
Igor,
Thank you - this is the link I found and seems just what I was looking for
http://wicketstuff.org/wicket13/compref/;jsessionid=A9F9170F03765B6C9DEE45A31E5FA494?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.RadioGroupPage

Thanks,
Russ
_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

Re: Radio button question

Posted by Igor Vaynberg <ig...@gmail.com>.
the example of radiogroup in wicket-examples/component reference
demonstrates a radio group with a variable amount of radios.

-igor

On Mon, Jul 6, 2009 at 6:07 PM, Russell
Simpkins<ru...@hotmail.com> wrote:
>
> All,
> I want to display a radio button of options with an associated image e.g.
> <input type="radio" name="selectone" value="1"><img src="img_vala.gif" ..><input type="radio" name="selectone" value="2"><img src="img_valb.gif" ..><input type="radio" name="selectone" value="3"><img src="img_valc.gif" ..>
> And have those values driven from my Model. I feel caught somewhere between RadioGroup and RadioList but I'm not sure how to pull this off because RadioGroup documentation seems to suggest that I have to have wicket:id= for each radio option, and I won't know how many options since its database driven. RadioList does the radio options fine, but I can't figure out how to render the image.
> I am using a RadioList and an implementation of IChoiceRenderer. I tried adding the image html to the getDisplayValue method, but the image would not render.
> I'm still new to Wicket so I may have missed this in the docs, if so feel free to paste link to any example or doc that I should have read closer :-)
> Thanks in advance,
> Russ
> _________________________________________________________________
> Windows Live™ SkyDrive™: Get 25 GB of free online storage.
> http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org