You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by heikki <tr...@gmail.com> on 2012/04/18 17:48:43 UTC

How to prevent linebreaks after radio input ?

hello,

Wicket inserts <br /> after radio input elements generated by RadioChoice.

How can I prevent that ?

My code:

RadioChoice<String> optionsRadioChoice = new RadioChoice<String>("option",
new PropertyModel<String>(this, "option"), optionsList);
add(optionsRadioChoice );



This generates this HTML:


<input name="option" type="radio" checked="checked" value="0"
id="options-0"/>
<label for="options-0">some value</label><br />

<input name="option" type="radio" value="1" id="options-1"/>
<label for="options-1">another value</label><br />

Obviously I want to control my HTML layout and I don't want automatically
generated <br /> elements. How can I do that ?

thanks in advance
Heikki Doeleman


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-prevent-linebreaks-after-radio-input-tp4568121p4568121.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to prevent linebreaks after radio input ?

Posted by Martin Grigorov <mg...@apache.org>.
org.apache.wicket.markup.html.form.RadioChoice#setPrefix , #setSuffix

On Wed, Apr 18, 2012 at 6:48 PM, heikki <tr...@gmail.com> wrote:
> hello,
>
> Wicket inserts <br /> after radio input elements generated by RadioChoice.
>
> How can I prevent that ?
>
> My code:
>
> RadioChoice<String> optionsRadioChoice = new RadioChoice<String>("option",
> new PropertyModel<String>(this, "option"), optionsList);
> add(optionsRadioChoice );
>
>
>
> This generates this HTML:
>
>
> <input name="option" type="radio" checked="checked" value="0"
> id="options-0"/>
> <label for="options-0">some value</label><br />
>
> <input name="option" type="radio" value="1" id="options-1"/>
> <label for="options-1">another value</label><br />
>
> Obviously I want to control my HTML layout and I don't want automatically
> generated <br /> elements. How can I do that ?
>
> thanks in advance
> Heikki Doeleman
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-prevent-linebreaks-after-radio-input-tp4568121p4568121.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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