struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trang_ngu...@agilent.com
Subject RE: Question iterating over an array
Date Wed, 25 Jun 2003 11:50:30 GMT
Hi,

MeasResultValue.java is XDoclet generated code (attached below).
I tried another approach using a scriplet (<%=item%>) and it seems to work, but I am
frustrated why <bean:write ...> does not work, so it's great if you would have some
ideas.

Thanks,
Trang


<logic:iterate id="item" name="measResults"  type="com.agilent.accessfiber.upa.core.ejb.MeasResultValue">
	 <jsp:useBean id="otdrTraceProducer" class="com.agilent.accessfiber.report.util.otdr.OTDRTraceDataProducer"/>
	<cewolf:chart 
		...
		<cewolf:producer id="otdrTraceProducer"> 
			<cewolf:param name="measResult" value="<%=item%>" /> 
		...
	</cewolf:chart> 
	<cewolf:img chartid="OTDRChart" renderer="cewolf" width="500" height="270"/> 
 </logic:iterate>

-----Original Message-----
From: Mick Knutson [mailto:mickknutson@hotmail.com]
Sent: Mittwoch, 25. Juni 2003 00:34
To: struts-user@jakarta.apache.org
Subject: RE: Question iterating over an array


Can you send the MeasResultValue.java code?
Maybe there is something inside there?



---
Thanks...
Mick Knutson
---





>From: <trang_nguyen@agilent.com>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: <struts-user@jakarta.apache.org>
>Subject: RE: Question iterating over an array
>Date: Wed, 25 Jun 2003 00:27:12 +0200
>
>Hi again,
>
>I found out that the iteration does work, but I am now running into a type 
>conversion problem:
>
>[ServletException in:/jsp/content/otdr/OTDRMeasurementDetailedBody.jsp] 
>Unable to convert string '' to class java.io.Serializable for attribute 
>value: java.lang.IllegalArgumentException: Property Editor not registered 
>with the PropertyEditorManager' org.apache.jasper.JasperException: Unable 
>to convert string '' to class java.io.Serializable for attribute value: 
>java.lang.IllegalArgumentException: Property Editor not registered with the 
>PropertyEditorManager
>...
>
>I'm not sure what this means since MeasResultValue is serializable.
>I've also tried to explicitly specify the type of the bean object, but 
>still get the same error:
>	<logic:iterate id="item" name="measResults"  
>type="com.agilent.accessfiber.upa.core.ejb.MeasResultValue">
>
>	<cewolf:chart
>	...
>		<cewolf:producer id="otdrTraceProducer">
>			<cewolf:param name="measResult" value='<bean:write name="item"/>' />
>		</cewolf:producer>
>
>	</cewolf:chart>
>	...
>  </logic:iterate>
>Could someone shed some light?
>
>Regards,
>Trang
>===============================================================================
>
>Hi,
>
>I have an array of objects over which I would like to iterate. I am using 
>the <bean:write> tag to pass the value of one object in the collection to 
>another tag. However, the <bean:write> tag is always returning a null 
>value. I've tried several combinations but can't get this to work. I would 
>really appreciate it if someone could help me out.
>
>Here's a snippet of my JSP code:
><%
>		MeasResultValue [] measResults = (MeasResultValue 
>[])request.getAttribute			("measResults");
>		pageContext.setAttribute("measResults", measResults);
>%>
>
><logic:iterate id="item" name="measResults" property="measResults">
>
>	 <jsp:useBean id="otdrTraceProducer" 
>class="com.agilent.accessfiber.report.util.otdr.OTDRTraceDataProducer"/>
>	<cewolf:chart
>
>	...
>
>		<cewolf:producer id="otdrTraceProducer">
>			<cewolf:param name="measResult" value='<bean:write name="item"/>' />
>		</cewolf:producer>
>
>	</cewolf:chart>
>	...
>  </logic:iterate>
>



Mime
View raw message