You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Franz Wong <fr...@gmail.com> on 2010/08/13 08:13:59 UTC

Multiple field with same name

Hi,

I would like to show a list of user and enable the change of the name. I
don't know if there is any mechanism which struts provided to do that.

class User {
    private Long id;
    private String name;

    // getters and setters
}

<form action="updateUser">
    <table>
    <s:iterator value="users">
      <tr>
        <td>
          <s:textfield name="name"/>
        </td>
      </tr>
    </s:iterator>
    </table>
    <s:submit/>
</form>

Thanks.
Franz

Re: Multiple field with same name

Posted by Franz Wong <fr...@gmail.com>.
I have solved the problem. The thread I referenced is correct.

Franz

On Fri, Aug 13, 2010 at 6:00 PM, Franz Wong <fr...@gmail.com> wrote:

> I found the "Type conversion" page from struts official web site and I
> followed the "Advanced example for indexed Lists and Maps", but I cannot get
> it work.
>
> Then I followed this thread [1]. However, my list only contains 1 null
> object.
>
> Franz
>
> [1]
> http://old.nabble.com/-S2--Beans-list-in-Dynamic-form-and-ParametersInterceptor-problem-td15016850.html
>
>
> On Fri, Aug 13, 2010 at 2:13 PM, Franz Wong <fr...@gmail.com> wrote:
>
>> Hi,
>>
>> I would like to show a list of user and enable the change of the name. I
>> don't know if there is any mechanism which struts provided to do that.
>>
>> class User {
>>     private Long id;
>>     private String name;
>>
>>     // getters and setters
>> }
>>
>> <form action="updateUser">
>>     <table>
>>     <s:iterator value="users">
>>       <tr>
>>         <td>
>>           <s:textfield name="name"/>
>>         </td>
>>       </tr>
>>     </s:iterator>
>>     </table>
>>     <s:submit/>
>> </form>
>>
>> Thanks.
>> Franz
>>
>
>

Re: Multiple field with same name

Posted by Franz Wong <fr...@gmail.com>.
I found the "Type conversion" page from struts official web site and I
followed the "Advanced example for indexed Lists and Maps", but I cannot get
it work.

Then I followed this thread [1]. However, my list only contains 1 null
object.

Franz

[1]
http://old.nabble.com/-S2--Beans-list-in-Dynamic-form-and-ParametersInterceptor-problem-td15016850.html

On Fri, Aug 13, 2010 at 2:13 PM, Franz Wong <fr...@gmail.com> wrote:

> Hi,
>
> I would like to show a list of user and enable the change of the name. I
> don't know if there is any mechanism which struts provided to do that.
>
> class User {
>     private Long id;
>     private String name;
>
>     // getters and setters
> }
>
> <form action="updateUser">
>     <table>
>     <s:iterator value="users">
>       <tr>
>         <td>
>           <s:textfield name="name"/>
>         </td>
>       </tr>
>     </s:iterator>
>     </table>
>     <s:submit/>
> </form>
>
> Thanks.
> Franz
>

[ANN]VTD-XML 2.9

Posted by Jimmy Zhang <cr...@comcast.net>.
VTD-XML 2.9, the next generation XML Processing API for SOA and Cloud computing, has been released. Please visit  https://sourceforge.net/projects/vtd-xml/files/ to download the latest version.
  a.. Strict Conformance 
    a.. VTD-XML now fully conforms to XML namespace 1.0 spec 
  b.. Performance Improvement
    a.. Significantly improved parsing performance for small XML files 
  c.. Expand Core VTD-XML API  
    a.. Adds getPrefixString(), and toNormalizedString2() 
  d.. Cutting/Splitting 
    a.. Adds getSiblingElementFragment()  
  e.. A number of bug fixes and code enhancement including: 
    a.. Fixes a bug for reading very large XML documents on some platforms 
    b.. Fixes a bug in parsing processing instruction 
    c.. Fixes a bug in outputAndReparse()