Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Java Bean binding is not working with iterator Struts 2  RSS feed

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I want my bean to behave like a two way binding. But it is binding one way only. please help. following is the snippet

<s:iterator value="pm.pp" status="stat" var="currentObject">
<tr><td width='150' style='padding-top: 1%;'>

<s:textfield value="%{#currentObject.protocolParamName}" nam="currentObject[%{#stat.index}].protocolParamName" cssClass="TextBox177"/>

</td>
</tr>
</s:iterator>

It is showing the values in jsp page, but when i edit those values they are not reflected in java bean that is in Action class.

Am i doing some thing wrong?

Thanks
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<s:textfield value="%{#attr.currentObject.protocolParamName}" nam="currentObject[%{#attr.stat.index}].protocolParamName" cssClass="TextBox177"/>
 
Hold that thought. Tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!