samedi 2 juillet 2016

How to set / assign values of JSON to Form Bean or html:hidden to form field

I am getting some dynamic data from ajax call, which i want to set to Form bean

document.getElementById("Market").innerHTML= jsonObj.Market;
document.getElementById("FromDate").innerHTML= jsonObj.jsonFromDate;
document.getElementById("ToDate").innerHTML= jsonObj.jsonToDate ;

<tr >
<td id="marketnamesLbl">
MARKET
</td>
<td id="Market" >
<bean:write name="MyRequestForm" property="Market" />
<html:hidden property="Market"  name="MyRequestForm" styleId="marketNames"/>
</td>
</tr>

After submit action i am getting null values for MyRequestForm.getMarket() please help on what are the ways to set json object values to from bean in struts?

How to assign innerHtml value to <html:hidden property="Market" name="MyRequestForm" styleId="marketNames"/>

Aucun commentaire:

Enregistrer un commentaire