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=12360>.
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=12360

<html:submit disabled="<rt expr>" /> not compiled correctly

           Summary: <html:submit disabled="<rt expr>" /> not compiled
                    correctly
           Product: Struts
           Version: 1.1 Beta 2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Custom Tags
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The disabled parameter accepts valid values of 'true','false','0','1',etc.  
When specified as literals the JSP compiler generates valid code.  When 
specified as a runtime expression the JSP compiler fails to generate the code 
to convert the string into a boolean value.  (Martin Cooper has verified this 
on both Tomcat and Resin - thanks Martin!)  For example, the following code 
fails:

   <% String buttonStatus = (String) session.getAttribute("buttonStatus"); %>
   <html:submit value="Submit" disabled="<%= buttonStatus %>" />

The returned message is 

  Incompatible type for method. Can't convert java.lang.String to
  boolean. _jspx_th_html_submit_2.setDisabled(buttonStatus);

This was originally found on using Struts 1.1B2, Tomcat 3.3.1, J2SDK1.4.0_01 on 
a Windows NT platform.  Martin has confirmed on Tomcat 4.1.10 and Resin 2.1.4.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to