struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete Serafin <psera...@sbti.com>
Subject Bean define problem
Date Fri, 21 Jun 2002 15:53:36 GMT
Ive run into a problem that is probably very esaily solved, but I cant
seem to find the problem.  I am trying to grab a value from an
attribute in my ActionForm to use as a tag parameter within my JSP.  The
attribute is an int.  I am defining the attribute in the jsp with
the following tag:

<bean:define id="maintenanceType" property="maintenanceType"
name="hardwareForm" type="int"/>

Problem is the JSP errors with the following:

    Incompatible type for declaration. Can't convert null to int.

Within the compile jsp I see this:

                 _jspx_th_bean_define_0.setPageContext(pageContext);
                _jspx_th_bean_define_0.setParent(null);
                _jspx_th_bean_define_0.setId("maintenanceType");
                _jspx_th_bean_define_0.setName("hardwareForm");
                _jspx_th_bean_define_0.setProperty("maintenanceType");
                _jspx_th_bean_define_0.setType("int");
                int maintenanceType = null;   <----- error here

Why is the tag trying to force the initial value to null instead of 0?
Am I using the tag incorrectly? By the way, I have used this tag on the
same page for retrieving a String attribute without any problems. Any
help is greatly appreciated.



Pete Serafin




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message