From: <sea...@mi...> - 2007-02-01 20:11:52
|
Update of /cvsroot/jaffa/JaffaCore/source/java/org/jaffa/presentation/portlet/widgets/taglib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32322 Modified Files: RadioButtonTag.java Log Message: Synch with the fix on 3.2.0 branch: use the correct name for both enclosed and non-enclosed ratio buttons. Index: RadioButtonTag.java =================================================================== RCS file: /cvsroot/jaffa/JaffaCore/source/java/org/jaffa/presentation/portlet/widgets/taglib/RadioButtonTag.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** RadioButtonTag.java 30 Jan 2007 19:53:38 -0000 1.21 --- RadioButtonTag.java 1 Feb 2007 20:11:47 -0000 1.22 *************** *** 157,172 **** } else { StringBuffer sb = new StringBuffer(); sb.append("<input id=\"" + idPrefix + "\" "); ! if (!TagHelper.isEnclosed(pageContext)) ! sb.append("name=\"" + getField() + "WV\" "); // A RadioGroup needs a name as that is how they are linked, but if it is enclosed on the table // we don't want the values posed back, as the data is encoded in the enclosing widget. ! else ! sb.append("name=\"" + idPrefix + "\" "); sb.append("type=\"Radio\" "); sb.append("class=\"WidgetRadioButton\" "); sb.append("value=\"" + getSelectValue() + "\"" + (getSelectValue().equals(widgetValue) ? " checked" : "") + ">\n"); ! sb.append(getWidgetRegistrationScript(getField()+"WV", false)); return sb.toString(); } --- 157,176 ---- } else { StringBuffer sb = new StringBuffer(); + String btnName = ""; sb.append("<input id=\"" + idPrefix + "\" "); ! if (!TagHelper.isEnclosed(pageContext)) { ! btnName = getField() + "WV"; ! sb.append("name=\"" + btnName +"\" "); // A RadioGroup needs a name as that is how they are linked, but if it is enclosed on the table // we don't want the values posed back, as the data is encoded in the enclosing widget. ! } else { ! btnName = idPrefix; ! sb.append("name=\"" + btnName + "\" "); ! } sb.append("type=\"Radio\" "); sb.append("class=\"WidgetRadioButton\" "); sb.append("value=\"" + getSelectValue() + "\"" + (getSelectValue().equals(widgetValue) ? " checked" : "") + ">\n"); ! sb.append(getWidgetRegistrationScript(btnName, false)); return sb.toString(); } |