Re: @StrutsParameter
Lukasz Lenart <[email protected]> Wed, 8 Oct 2025 16:56:35 +0200
| Newsgroups | gmane.comp.jakarta.struts.user |
|---|---|
| Message-ID | <CAMopvkObsbp=ytB4CqONpLfa2e7gU-+dtBJpkSbzZeD1NxOutA@mail.gmail.com> |
pon., 29 wrz 2025 o 16:44 Prasanth <[email protected]> napisa=C5=82= (a): > > That was my thinking until ArrayList was not populated when I had the Str= utsParameter on getXXX. For ArrayList the annotation has to be on setXXX. But how do you set values on the list, could you show an example JSP form? I was testing this using a User entity with List/ArrayList and all works as expected @StrutsParameter(depth =3D 2) public List<User> getUsers() { return users; } <s:form action=3D"index" method=3D"POST"> <s:iterator value=3D"users" status=3D"status"> <s:hidden name=3D"users[%{#status.index}].id"/> <s:textfield name=3D"users[%{#status.index}].name" label=3D"User %{users[#status.index].id}" id=3D"user_%{users[#status.index].id}"/> </s:iterator> <s:submit/> </s:form> Cheers =C5=81ukasz