vivek jose

Greenhorn
+ Follow
since Sep 08, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vivek jose

Yes you can pass the entire VO back
<logic:iterate name="monthlyGainLossForm" property="ptcList" id="productTaxCat">
just give your VO as ID and your form will pick up values and pass to action
9 years ago
The code snippet was not the full one. But the issue was values not getting passed to action. It got fixed by putting the below line of code in JSP. This way I will get values through form in action.

<logic:iterate name="monthlyGainLossForm" property="ptcList" id="productTaxCat">
<html:hidden name="productTaxCat" property="ptcId" indexed="true" />
<html:hidden name="productTaxCat" property="ptcName" indexed="true" />
<html:hidden name="productTaxCat" property="ptcActive" indexed="true" />
<mf:tr>
<mf:td><bean:write name="productTaxCat" property="ptcName"/></mf:td>
<mf:td><bean:write name="productTaxCat" property="ptcActive"/></mf:td>
<mf:td><html:checkbox name="productTaxCat" property="msaPtcLtcGLType" styleClass="input" indexed="true"/></mf:td>
<mf:td><html:text name="productTaxCat" property="msaPtcLtcGLAmt" styleClass="label" style="width:100px;vertical-align:middle;" disabled="true" indexed="true"/></mf:td>
<mf:td><html:checkbox name="productTaxCat" property="msaMthlyStcGLType" styleClass="input" indexed="true"/></mf:td>
<mf:td><html:text name="productTaxCat" property="msaMthlyStcGLAmt" disabled="true" styleClass="label" style="width:100px;vertical-align:middle;" indexed="true"/></mf:td>
<mf:td><html:checkbox name="productTaxCat" property="nonMsaPtcGLType" styleClass="input" indexed="true"/></mf:td>
<mf:td><html:text name="productTaxCat" property="nonMsaPtcGLAmt" disabled="true" styleClass="label" style="width:100px;vertical-align:middle;" indexed="true"/></mf:td>
<mf:td><html:checkbox name="productTaxCat" property="nonMsaStcGLType" styleClass="input" indexed="true"/></mf:td>
<mf:td><html:text name="productTaxCat" property="nonMsaStcGLAmt" disabled="true" styleClass="label" style="width:100px;vertical-align:middle;" indexed="true"/></mf:td>
</mf:tr>
</logic:iterate>
9 years ago
I am having a JSP which has two labels four check boxes and four text fields. Since this is a set of data and can be dynamic these fields are stored in a value object and stored in a list and this list is passed to the action class.
The isue is when the form is sumbitted I am not able to get the updated list ofvalues through form into Struts.

I am using Struts 1.2.9

Code snippet of jsp below. Any urgent reply is highely appreciated as this has been wasting my weekends and sleep.

<logic:iterate name="monthlyGainLossForm" property="ptcList" id="ptc">
<mf:td>
<html:text name="ptc" property="ptcName" />
<html:hidden name ="ptc" property="ptcName"/>
</mf:td>
<mf:td><html:text name="ptc" property="ptcActive" /></mf:td>
<html:hidden name ="ptc" property="ptcActive"/>
<mf:td><html:checkbox name="ptc" disabled="false" property="msaPtcLtcGLType" styleClass="input"/>
<html:hidden name ="ptc" property="msaPtcLtcGLType"/></mf:td>
<mf:td><html:text name="ptc" readonly="true" property="msaPtcLtcGLAmt" styleClass="input"/>
<html:hidden name ="ptc" property="msaPtcLtcGLType"/></mf:td>
10 years ago