wood burning stoves 2.0*
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Indexed Action Form doubt" Watch "Indexed Action Form doubt" New topic
Author

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
http://www.developer.com/java/web/article.php/2233591
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"
type="org.apache.struts.action.DynaActionForm">
<form-property name="lines" type="com.explore.POLine[]" size="4" />
</form-bean>
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"/>
</action>
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
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
The only help I know to give is http://faq.javaranch.com/view?HowToAskQuestionsTheSmartWay - 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: http://aspose.com/file-tools
 
subject: Indexed Action Form doubt