You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "skip@thedevers" <sk...@thedevers.org> on 2008/03/27 04:58:18 UTC
Yikes
I have this URL
https://localhost:8443/purchasing/control/viewEoqItem?listIterator=org.ofbiz
.base.util.EntityListIteratorContainer@15d9be1&facilityId=PDI(1)-BOTHELL&pro
ductId=ADD-BEGINNER&next=Y&qtyToOrder_o_0=3&session=org.apache.catalina.sess
ion.StandardSessionFacade@1499154&update=Y
Note the
listIterator=org.ofbiz.base.util.EntityListIteratorContainer@15d9be1 part
I have this bit of bsh script called as part of my "viewEoqItem" url:
EntityListIteratorContainer container = parameters.get("listIterator");
if(container == null)
{
container = new EntityListIteratorContainer(delegator, "productId",
"InventorySoldSummary",
conditionList, null, null, UtilMisc.toList("productId"), null);
}
context.put("listIterator", container);
And this ftl:
< input type="hidden" name="listIterator" value="${listIterator}"/>
When the submit button gets pressed, the listIterator is available to the
service called here:
<request-map uri="updateSingleEoqValue">
<security https="true" auth="true"/>
<event type="service" invoke="updateOneEOQRequirement"/>
<response name="success" type="request-redirect"
value="viewEoqItem"/>
<response name="error" type="request-redirect" value="viewEoqItem"/>
</request-map>
However, the listIterator causes a ClassCastException in the bash script the
second time through on the line:
EntityListIteratorContainer container = parameters.get("listIterator");
Anyone have an idea what I am doing wrong with this? This is an experiment
to see if I can keep this EntityListIteratorContainer only as long as it
keeps getting passed in URLs.
Hope someone can help.
Skip
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
4:43 PM