Problems using indexed properties
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Boris_Wachowiak
Posted On:   Wednesday, May 22, 2002 09:19 AM

Hi there, I started using struts some time ago. Right now I've got a problem using indexed bean-properties. Imagine the following JSP-Code: <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib prefix="core" uri="http://java.sun.com/jstl/core" %> • ">&#; • ">    More>>

Hi there,

I started using struts some time ago.
Right now I've got a problem using indexed bean-properties.

Imagine the following JSP-Code:


			
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib prefix="core" uri="http://java.sun.com/jstl/core" %>








•

">&#;
•




">

&#;























The correspondig form is called glossaryListForm and I can ensure it's created correctly.
The actual error message is:
javax.servlet.ServletException: Cannot find bean glossaryListForm in scope page

There were a couple of other messages I forgot for the moment.

The glossaryListForm has an indexed property called glossaryAlphabet which is an array of Vectors. The Vectors themselve contain a collection of other form-objects.

So my question is how to adress indexed properties in that case.
The Source-Code-part that seems to be the problem is the following:



			
property="glossaryAlphabet[${i-65}]"

I tried a lot of different versions, but not one of them worked.


Regards,

Boris    <<Less

Re: Problems using indexed properties

Posted By:   Boris_Wachowiak  
Posted On:   Wednesday, May 22, 2002 10:01 AM

Addition:

I changed the scope to "request" and that's the error now:
Invalid indexed property 'glossaryAlphabet[${i-65}]'

I know how to interprete it, but not how to solve it.

Boris
About | Sitemap | Contact