The moose likes Struts and the fly likes Indexed Action Form doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Indexed Action Form doubt" Watch "Indexed Action Form doubt" New topic

Indexed Action Form doubt

Rashid Darvesh
Ranch Hand

Joined: Feb 13, 2004
Posts: 189
I came across this very good article on using the iNdexed action form but i need to find out how to initialize the array at runtime, i just pasted the link tothat article
This is waht i am doing
i have a java bean with three properties partNumber,Qty and price.
in the struts config.xml i have defined an action form whichis an array of this bean withe size hardcoded as 4
<form-bean name="purchaseOrderBeanForm"
<form-property name="lines" type="com.explore.POLine[]" size="4" />
This are my mapping
<action path="/generateBeanPOForm" forward="/purchaseOrderBean.jsp"
name="purchaseOrderBeanForm" scope="request"/>
<action path="/generateBeanPO" type="com.explore.GenerateBeanPO"
name="purchaseOrderBeanForm" scope="request" input="/purchaseOrderBean.jsp">
<forward name="success" path="/purchaseOrderBean.jsp" redirect="false"/>
What i really wanted to know was how can i initialize the bean array at runtime. I hope i am clear with my question. You can refer the tutorial if my question is a bit vague.
Any help
Rashid Darvesh
Ranch Hand

Joined: Feb 13, 2004
Posts: 189
Any help on this
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
The only help I know to give is - sorry.

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
I agree. Here's the link:
subject: Indexed Action Form doubt
It's not a secret anymore!