You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tito Eritja <ex...@e-inventa.net> on 2004/08/12 11:44:39 UTC

Problems with login:iterate

I'm new on Struts, and I'm trying to use the example from book
JakartaStrutsLife, but I get an
java.lang.ArrayIndexOutOfBoundsException: in <html:text
property="user[${index..... from:


<logic:iterate id="lineItem" 
		indexId="index" 
		name="adminUsersForm" 
		property="usersList"> 
  <tr> 
   <td> 
	<html:text property="user[${index}].user.firstName" /> 
   </td> 
   <td> 
	<html:text property="user[${index}].user.lastName" /> 
  </td> 
  <td> 
	<html:text disabled="true" property="user[${index}].user.email" /> 
  </td> 
  <td> 
	<html:checkbox property="user[${index}].checked" /> 
  </td> 
 </tr> 

</logic:iterate>

The problem occurs in getUser(index) function, as users has no
lineItems, but it is weird as getUsersList from the same code (iterate)
returns that users has some LineItems

I get the same error with Struts html and with html-el tag libraries.

Does anybody has experienced the same problem??

Thanks for your time


tito


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problems with logic:iterate

Posted by Tito Eritja <ex...@e-inventa.net>.
I found the error, I was using Xdoclet and I didn't specify in
@struts.action scope="session"

Thanks

tito

El jue, 12 de 08 de 2004 a las 11:44, Tito Eritja escribió:
> I'm new on Struts, and I'm trying to use the example from book
> JakartaStrutsLife, but I get an
> java.lang.ArrayIndexOutOfBoundsException: in <html:text
> property="user[${index..... from:
> 
> 
> <logic:iterate id="lineItem" 
> 		indexId="index" 
> 		name="adminUsersForm" 
> 		property="usersList"> 
>   <tr> 
>    <td> 
> 	<html:text property="user[${index}].user.firstName" /> 
>    </td> 
>    <td> 
> 	<html:text property="user[${index}].user.lastName" /> 
>   </td> 
>   <td> 
> 	<html:text disabled="true" property="user[${index}].user.email" /> 
>   </td> 
>   <td> 
> 	<html:checkbox property="user[${index}].checked" /> 
>   </td> 
>  </tr> 
> 
> </logic:iterate>
> 
> The problem occurs in getUser(index) function, as users has no
> lineItems, but it is weird as getUsersList from the same code (iterate)
> returns that users has some LineItems
> 
> I get the same error with Struts html and with html-el tag libraries.
> 
> Does anybody has experienced the same problem??
> 
> Thanks for your time
> 
> 
> tito
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org