File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Java Bean binding is not working with iterator Struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply Bookmark "Java Bean binding is not working with iterator Struts 2" Watch "Java Bean binding is not working with iterator Struts 2" New topic
Author

Java Bean binding is not working with iterator Struts 2

Jitendra Kumar Jain
Greenhorn

Joined: Jun 28, 2011
Posts: 14
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
Tomas Bilek
Greenhorn

Joined: Nov 17, 2011
Posts: 5
<s:textfield value="%{#attr.currentObject.protocolParamName}" nam="currentObject[%{#attr.stat.index}].protocolParamName" cssClass="TextBox177"/>
 
 
subject: Java Bean binding is not working with iterator Struts 2
 
Threads others viewed
struts 2 example to have a link in one of the Iterated value in the JSP and pass it to an action
s:iterator problem...
s:bean, s:set can individual HashMap Values be retrieved?
Struts tag iterator new line every 4th item
problem with struts2 checkbox
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture