Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Retrieving indexed fields using by action [Struts]

920854May 22 2012
Hello All !


I need to retrieve indexed fields using struts and im using DynaValidatorForm. Below, this is my code .

<code>
<logic:iterate id="paramEmpresa" name="listaParametros">
<div style="width: 600px;">
<div style="float: left; width: 250px;">
<label><bean:write name="paramEmpresa" property="dsParametro" ignore="true" /> </label>
</div>

<div style="float: right; width: 350px;">
<html:hidden name="paramEmpresa" property="cdParametro" indexed="true" />
<html:hidden name="paramEmpresa" property="tpParametro" indexed="true" />

<html:text name="paramEmpresa" property="vlParametro" size="25" value="" styleClass="required" indexed="true"/>
</div>
</div>
</logic:iterate>
And now, the HTML render by struts after submit the form :

<input type="hidden" name="paramEmpresa[0].cdParametro" value="1">
<input type="hidden" name="paramEmpresa[0].tpParametro" value="3">

<input type="text" name="paramLogo[0].vlParametro" size="25" value="100" class="required">

<input type="hidden" name="paramEmpresa[1].cdParametro" value="1">
<input type="hidden" name="paramEmpresa[1].tpParametro" value="3">

<input type="text" name="paramEmpresa[1].vlParametro" size="25" value="100" class="required">

</code>

And now, how i´m trying to do it... but its fail..

DynaValidatorForm logoForm = (DynaValidatorForm) form;
String[] paramEmpresa= (String[])logoForm.get("paramEmpresa");


Somebody help me please? Is it possible to do it? I dont know how can i retrieve this values by my action..

Thanks for help !!

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 19 2012
Added on May 22 2012
0 comments
494 views