Hi,
since you're allowing the default, the radioButton should get selected
when you click on it.
I'm not sure about your "onclick" attribute though - why aren't you
using AjaxRequestAttributes#setEventPropagation(STOP) ?
Regards
Sven
Am 02.03.2015 um 12:51 schrieb avchavan:
Hi here is my code:
JAVA:
final RadioGroup radioGroup = new RadioGroup("radioGroup");
final Radio selectable = new
Radio("selectable", new
Model(Boolean.FALSE));
selectable.setOutputMarkupPlaceholderTag(true);
selectable.add(new
AttributeAppender("onclick", new Model("if
(event.stopPropagation) { "+
"event.stopPropagation();"+
"} else { "+
"event.cancelBubble = true;"
+"}"), ";"));
selectable.add(new
AjaxEventBehavior("onclick") {
@Override
protected void
onEvent(AjaxRequestTarget target) {
System.out.println("inside
onclick");
accordion(target,
mainContainer, descriptionContainer,
baseContainer);
}
@Override
protected void
updateAjaxAttributes(AjaxRequestAttributes attributes)
{
super.updateAjaxAttributes(attributes);
attributes.setAllowDefault(true);
}
});
radioGroup.add(selectable);
radioGroup.setOutputMarkupPlaceholderTag(true);
baseContainer.add(radioGroup);
The above code is a part of a list view code.
HTML:
<div
wicket:id="listOfValues">
<input
wicket:id="selectable" type="radio">
My problem is the onClick event of the radio button click gets fired but the
radio button is never selected.
Thanks
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Radio-button-select-not-selecting-tp4669792.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]