dmkarr 2002/11/03 16:34:38 Modified: contrib/struts-el/doc/userGuide struts-html-el.xml doc/userGuide struts-html.xml src/share/org/apache/struts/taglib/html ImageTag.java Log: Fixed ordering of call to "prepareIndex()" and emitting of property value. The property value had to be before the call, but it was after. After looking at all the places this method is called, I've realized this method and the calls to it should be refactored so the method decides whether the place the array brackets before or after the property name. This is entirely determined by whether the "name" parameter is null, so the method already has this information. PR: 12959 Revision Changes Path 1.7 +4 -4 jakarta-struts/contrib/struts-el/doc/userGuide/struts-html-el.xml Index: struts-html-el.xml =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/doc/userGuide/struts-html-el.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- struts-html-el.xml 27 Oct 2002 20:29:42 -0000 1.6 +++ struts-html-el.xml 4 Nov 2002 00:34:37 -0000 1.7 @@ -2127,10 +2127,10 @@ <required>false</required> <rtexprvalue>false</rtexprvalue> <info> - Valid only inside of logic:iterate tag. - If yes then name of the html tag will be rendered as - "id[34].propertyName". Number in brackets will be generated - for every iteration and taken from ancestor logic:iterate tag. + Valid only inside of logic:iterate tag. If <code>true</code> + then name of the html tag will be rendered as + "propertyName[34]". Number in brackets will be generated for + every iteration and taken from ancestor logic:iterate tag. </info> </attribute> 1.34 +12 -12 jakarta-struts/doc/userGuide/struts-html.xml Index: struts-html.xml =================================================================== RCS file: /home/cvs/jakarta-struts/doc/userGuide/struts-html.xml,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- struts-html.xml 3 Nov 2002 04:24:50 -0000 1.33 +++ struts-html.xml 4 Nov 2002 00:34:37 -0000 1.34 @@ -124,10 +124,10 @@ <required>false</required> <rtexprvalue>true</rtexprvalue> <info> - Valid only inside of logic:iterate tag. - If <code>true</code> then name of the html tag will be rendered as - "propertyName[34]". Number in brackets will be generated - for every iteration and taken from ancestor logic:iterate tag. + Valid only inside of logic:iterate tag. If <code>true</code> + then name of the html tag will be rendered as + "propertyName[34]". Number in brackets will be generated for + every iteration and taken from ancestor logic:iterate tag. </info> </attribute> @@ -2342,10 +2342,10 @@ <required>false</required> <rtexprvalue>true</rtexprvalue> <info> - Valid only inside of logic:iterate tag. - If <code>true</code> then name of the html tag will be rendered as - "id[34].propertyName". Number in brackets will be generated - for every iteration and taken from ancestor logic:iterate tag. + Valid only inside of logic:iterate tag. If <code>true</code> + then name of the html tag will be rendered as + "propertyName[34]". Number in brackets will be generated for + every iteration and taken from ancestor logic:iterate tag. </info> </attribute> @@ -6028,10 +6028,10 @@ <required>false</required> <rtexprvalue>true</rtexprvalue> <info> - Valid only inside of logic:iterate tag. - If <code>true</code> then name of the html tag will be rendered as - "propertyName[34]". Number in brackets will be generated - for every iteration and taken from ancestor logic:iterate tag. + Valid only inside of logic:iterate tag. If <code>true</code> + then name of the html tag will be rendered as + "propertyName[34]". Number in brackets will be generated for + every iteration and taken from ancestor logic:iterate tag. </info> </attribute> 1.22 +13 -9 jakarta-struts/src/share/org/apache/struts/taglib/html/ImageTag.java Index: ImageTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImageTag.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- ImageTag.java 26 Oct 2002 15:08:16 -0000 1.21 +++ ImageTag.java 4 Nov 2002 00:34:38 -0000 1.22 @@ -218,12 +218,16 @@ (HttpServletResponse) pageContext.getResponse(); String tmp = null; StringBuffer results = new StringBuffer(); - results.append("<input type=\"image\" name=\""); - // @since Struts 1.1 - if( indexed ) + results.append("<input type=\"image\""); + if (property != null) { + results.append(" name=\""); + results.append(property); + // @since Struts 1.1 + if( indexed ) prepareIndex( results, null ); - results.append(property); - results.append("\""); + results.append("\""); + } + tmp = src(); if (tmp != null) { results.append(" src=\"");
-- To unsubscribe, e-mail: <mailto:struts-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>