protected ListModel<?> getComponentModel(Radiogroup comp) { return comp.getModel(); } }
protected ListModel<?> getComponentModel(Radiogroup comp) { return comp.getModel(); } }
protected ListModel getModel() { return radiogroup.getModel(); }
public Object coerceToBean(Object val, Component comp, BindContext ctx) { if (val != null) { final ListModel<?> model = ((Radio) val).getRadiogroup().getModel(); if (model != null && !(model instanceof Selectable)) { throw new UiException("model doesn't implement Selectable"); } if (model != null) { Set<?> selection = ((Selectable<?>) model).getSelection(); if (selection == null || selection.size() == 0) return null; return selection.iterator().next(); } else { //no model return ((Radio) val).getValue(); } } return null; } }
@SuppressWarnings("unchecked") public Object coerceToUi(Object val, Component comp, BindContext ctx) { Radiogroup radiogroup = (Radiogroup) comp; final ListModel<?> model = radiogroup.getModel();
public void render(final Radio item, final Object data, final int index) throws Exception { final Radiogroup radiogroup = item.getRadiogroup(); final int size = radiogroup.getModel().getSize(); final Template tm = resolveTemplate(radiogroup, item, data, index, size, "model"); if (tm == null) {