You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/08/20 17:55:13 UTC

DO NOT REPLY [Bug 11866] New: - html:submit bug

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11866>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11866

html:submit bug

           Summary: html:submit bug
           Product: Struts
           Version: 1.1 Beta 2
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Custom Tags
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: rlata@ffic.com


Generated html source using html:submit with indexed="true" is incorrect.

Example

1.1-b2 (does not work) - the indexId [17] is outside the double quotes

<td align=CENTER>
<input type="submit" name="cmd"[17] value="Approve" class="tableButton"
title="help text for approvescreen.button.approve">
</td>


The correct generated html source should be

<td align=CENTER>
<input type="submit" name="cmd[17]" value="Approve" class="tableButton"
title="help text for approvescreen.button.approve" alt="???en_GB.null???">
</td>


This problem generates the following error message

java.lang.reflect.InvocationTargetException: Cannot set cmd
at

or "no getter method for cmd" depending on what jdk the code is executed

if there is no setCmd(String value) method in the bean. Since we are using 
indexed="true" we only have a setCmd(int indexId, String value).

Suspect code is in apache.org.struts.taglib.html.SubmitTag's doEndTag() method

 // Generate an HTML element
        StringBuffer results = new StringBuffer();
        results.append("<input type=\"submit\"");
        if (property != null) {
            results.append(" name=\"");
            results.append(property);
            results.append("\"");
        }

        // * @since Struts 1.1
       	if( indexed ) 
            prepareIndex( results, null );
	        

The indexId is written after the "name" attribute has been enclosed with quotes

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>