/** Returns the name of this radio button. * <p>Don't use this method if your application is purely based * on ZK's event-driven model. * <p>It is readonly, and it is generated automatically * to be the same as its parent's name ({@link Radiogroup#getName}). */ public String getName() { final Radiogroup group = getRadiogroup(); return group != null ? group.getName() : getUuid(); }
public void render(Component comp, Writer out) throws IOException { final SmartWriter wh = new SmartWriter(out); final Radio self = (Radio)comp; final String uuid = self.getUuid(); wh.write("<span id=\"").write(uuid).write("\" z.type=\"zul.btn.Radio\"") .write(self.getOuterAttrs()).write(">").write("<input type=\"radio\" id=\"") .write(uuid).write("!real\"").write(self.getInnerAttrs()) .write("/><label for=\"").write(uuid).write("!real\"") .write(self.getLabelAttrs()) .write(" class=\""+self.getZclass()+"-cnt\"") .write(">") .write(self.getImgTag()).write(self.getLabel()) .write("</label>"); if(self.getRadiogroup() != null && self.getRadiogroup().getOrient().equals("vertical")) wh.writeln("<br/>"); wh.write("</span>"); } }