This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,899 Users
  • 2,269,649 Discussions
  • 7,916,821 Comments

Discussions

Retrieving indexed fields using by action [Struts]

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 !!
This discussion has been closed.