| Author |
Problem using nested logic:iterate tags
|
Jose Tharayil Raphael
Greenhorn
Joined: Aug 11, 2003
Posts: 4
|
|
Hi, I am having a problem with struts nested logic:iterate tags Below is the code: <logic:notEmpty name="aimEditActivityForm" property="fundingOrganizations"> <logic:iterate name="aimEditActivityForm" property="fundingOrganizations" id="fundingOrganization" type="org.digijava.module.aim.helper.FundingOrganization"> <logic :present name="fundingOrganization"> <logic:iterate name="fundingOrganization" property="fundings" id="funding" type="org.digijava.module.aim.helper.Funding"> <logic :present name="funding"> <logic:iterate name="funding" property="fundingDetails" id="fundingDetail" type="org.digijava.module.aim.helper.FundingDetail"> <logic :p resent name="fundingDetail"> <tr bgcolor="#006699" class="textalb"> <td><b><font color="white"></font></b></td> </tr> </logic :present> </logic:iterate> </logic :present> </logic:iterate> </logic :present> </logic:iterate> </logic:notEmpty> The jsp page is not compiling below is the error : line: 112 in the jsp file: /repository/aim/view/addFunding.jsp Generated servlet error: G:\jboss\server\default\work\jboss.web\localhost\digijava\org\apache\jsp\repository\aim\view\addFunding_jsp.java:343: incompatible types found : java.lang.String required: org.digijava.module.aim.helper.FundingDetail _jspx_fundingDetail_2 = fundingDetail; ^ An error occurred at line: 112 in the jsp file: /repository/aim/view/addFunding.jsp Generated servlet error: G:\jboss\server\default\work\jboss.web\localhost\digijava\org\apache\jsp\repository\aim\view\addFunding_jsp.java:349: incompatible types found : org.digijava.module.aim.helper.FundingDetail required: java.lang.String fundingDetail = (org.digijava.module.aim.helper.FundingDetail) _jspx_page_context.findAttribute("fundingDetail"); ^ An error occurred at line: 112 in the jsp file: /repository/aim/view/addFunding.jsp Generated servlet error: G:\jboss\server\default\work\jboss.web\localhost\digijava\org\apache\jsp\repository\aim\view\addFunding_jsp.java:358: incompatible types found : org.digijava.module.aim.helper.FundingDetail required: java.lang.String fundingDetail = (org.digijava.module.aim.helper.FundingDetail) _jspx_page_context.findAttribute("fundingDetail"); ^ An error occurred at line: 112 in the jsp file: /repository/aim/view/addFunding.jsp Generated servlet error: G:\jboss\server\default\work\jboss.web\localhost\digijava\org\apache\jsp\repository\aim\view\addFunding_jsp.java:362: incompatible types found : org.digijava.module.aim.helper.FundingDetail required: java.lang.String fundingDetail = _jspx_fundingDetail_2; ^ 4 errors ' The fundings and fundingDetails collection are null.I tried checking with logic:notEmpty tags. But it's giving a compile error so does not reach there. I am stumped. Thanks in advance. [ January 09, 2005: Message edited by: Jose Tharayil Raphael ]
|
 |
Jose Tharayil Raphael
Greenhorn
Joined: Aug 11, 2003
Posts: 4
|
|
Hi, Found out the problem.I am using Struts 1.1 . The struts logic:iterate tags doesn't seem to support nested logic:iterate tags beyond 2 levels. I used JSTL and it worked fine.
|
 |
 |
|
|
subject: Problem using nested logic:iterate tags
|
|
|