You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by elyes sallem <el...@gmail.com> on 2009/02/19 10:53:04 UTC
"Cannot find bean in any scope" error
Hello,
i have a jsp in which i there is a loop with nested:iterate:
<nested:iterate indexId="indexOr" id="ajustCpeGroupByOr"
property="listAjustCpeByOr">
<%
int indexeOr=indexOr;
OrdreRegrpmt or =
((AjustCPEGroupedByOr) ajustCpeGroupByOr)
.getOr();
%>
<nested:iterate indexId="indexAjustCpe"
id="ajustCpeId"
property="listCPE">
<tr>
<nested:equal value="0"
property="ajustCpe.ajustCpeEditMode">
<td colspan="1"
style="width: 501px;
border-right: #508ECC 1px solid; border-top: #508ECC 1px solid; border-left:
#508ECC 1px solid; border-bottom: #508ECC 1px solid; height: 40px;
text-align: left; background-color: #508ECC; vertical-align: top;
border-collapse: collapse;">
<span style="font-size: 8pt;
color: #ffffff"><strong><nested:write
property="ajustCpe.projet.prjLib" /></strong></span></td>
<td colspan="1"
style="width: 572px; height:
40px; text-align: center; border-right: #d8e4f8 1px solid; border-top:
#d8e4f8 1px solid; border-left: #d8e4f8 1px solid; border-bottom: #d8e4f8
1px solid; background-color: inactivecaptiontext;"> <span
style="font-size:
8pt"><%=or.getOrCode()%></span></td>
<td colspan="1"
style="width: 514px; height:
40px; text-align: center; border-right: #d8e4f8 1px solid; border-top:
#d8e4f8 1px solid; border-left: #d8e4f8 1px solid; border-bottom: #d8e4f8
1px solid; background-color: inactivecaptiontext;"> <span
style="font-size:
8pt"><%=bu%></span></td>
<td colspan="1"
style="width: 632px; height:
40px; text-align: center; border-right: #d8e4f8 1px solid; border-top:
#d8e4f8 1px solid; border-left: #d8e4f8 1px solid; border-bottom: #d8e4f8
1px solid; background-color: inactivecaptiontext;">
<span style="font-size: 8pt">
<nested:write
name="dernierCpeEmporte"
format="#,##0.#" /></span></td>
<td colspan="1"
style="width: 1120px;
height: 40px; text-align: center; border-right: #d8e4f8 1px solid;
border-top: #d8e4f8 1px solid; border-left: #d8e4f8 1px solid;
border-bottom: #d8e4f8 1px solid; background-color: inactivecaptiontext;">
<span style="font-size:
8pt"><nested:write
property="ajustCpe.dtCutoffdernierscpimp"
format="dd/MM/yyyy"
/></span></td>
<td colspan="1"
style="width: 650px; height:
40px; text-align: center; border-right: #d8e4f8 1px solid; border-top:
#d8e4f8 1px solid; border-left: #d8e4f8 1px solid; border-bottom: #d8e4f8
1px solid; background-color: inactivecaptiontext;"><nested:text
property="ajustCpe.cpeajustMtCorrection" /></td>
<td colspan="1"
style="height: 40px;
text-align: center; border-right: #d8e4f8 1px solid; border-top: #d8e4f8 1px
solid; border-left: #d8e4f8 1px solid; width: 2px; border-bottom: #d8e4f8
1px solid; background-color: inactivecaptiontext;">
<a href="#"
onclick="popitup(<%=((TmpAjustCpe)ajustCpeId).getIdTmpAjustCpe()
%>)"><nested:write
property="ajustCpe.shortCpeAjustComment" /> </a></td>
<td colspan="1"
style="height: 40px;
text-align: center; border-right: #d8e4f8 1px solid; border-top: #d8e4f8 1px
solid; border-left: #d8e4f8 1px solid; width: 602px; border-bottom: #d8e4f8
1px solid; background-color: inactivecaptiontext;">
<span style="font-size:
8pt"><nested:write
name="cpeCorrige"
format="#,##0.#" /></span></td>
<td colspan="1"
style="width: 223px; height:
40px; text-align: center; border-right: #d8e4f8 1px solid; border-top:
#d8e4f8 1px solid; border-left: #d8e4f8 1px solid; border-bottom: #d8e4f8
1px solid; background-color: inactivecaptiontext;">
<span style="font-size:
8pt"><nested:write
property="ajustCpe.dtCorrection" format="dd/MM/yyyy" /></span></td>
<td colspan="1"
style="border-right: #d8e4f8
1px solid; background-color: <%= couleur %>
and in the class from which i instantiate ajustCpeId, i have a property,
private BigDecimal dernierCpeEmporte;
but when i launch the page, i got this error
javax.servlet.jsp.JspException: Cannot find bean dernierCpeEmporte in any
scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:934)
at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:225)
any one has an idea?
Regards
Elyes.