tag:blogger.com,1999:blog-603254884063001716.post764624295340338486..comments2023-07-10T17:38:43.095+02:00Comments on Life in IDE: Dynamic forms, LazyList and transparent items removall0cohttp://www.blogger.com/profile/12633925472794511454noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-603254884063001716.post-4298476507206806132013-06-07T16:32:58.397+02:002013-06-07T16:32:58.397+02:00this code is wrongthis code is wrongAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-603254884063001716.post-91797791737670944122012-12-10T19:32:12.924+01:002012-12-10T19:32:12.924+01:00It should work using plain HTML, of course the POS...It should work using plain HTML, of course the POST data should be directed properly to the server side binder. If it doesn't work for you, you need to review what exactly goes with your POST data and how the binder works when receive it.l0cohttps://www.blogger.com/profile/12633925472794511454noreply@blogger.comtag:blogger.com,1999:blog-603254884063001716.post-69238713168125906442012-12-10T18:23:17.390+01:002012-12-10T18:23:17.390+01:00If my JSP form elements look like your example one...If my JSP form elements look like your example ones, should the code work using the LazyList? Or would I need to add all of the tags into my JSP first, as demonstrated in http://mattfleming.com/node/134?Anonymoushttps://www.blogger.com/profile/15922907154133999669noreply@blogger.comtag:blogger.com,1999:blog-603254884063001716.post-85221800547865537262012-04-04T06:54:44.872+02:002012-04-04T06:54:44.872+02:00Looks nice, thanks for sharing.Looks nice, thanks for sharing.l0cohttps://www.blogger.com/profile/12633925472794511454noreply@blogger.comtag:blogger.com,1999:blog-603254884063001716.post-79283840294172681802012-04-03T23:33:12.583+02:002012-04-03T23:33:12.583+02:00Your solution works great when creating a new mast...Your solution works great when creating a new master entity, but it's a bit more complicated when you want to update a previously created master entity. I found a solution using a boolean flag that indicates whether the dynamically added child entity should be removed or not. You can find a full working example there: http://stackoverflow.com/questions/9671640/spring-3-mvc-managing-a-one-to-many-relation-within-a-dynamic-form-using-aChris Testhttps://www.blogger.com/profile/00721152265451518571noreply@blogger.comtag:blogger.com,1999:blog-603254884063001716.post-19277044949731561952011-09-08T07:19:30.970+02:002011-09-08T07:19:30.970+02:00Gobi, the order of binding items to collection dep...Gobi, the order of binding items to collection depends on your internal items order (indexes) on client side, prepared by used javascript mechanism. Check your post data when you submit the form, what's the order of elements sent from there?l0cohttps://www.blogger.com/profile/12633925472794511454noreply@blogger.comtag:blogger.com,1999:blog-603254884063001716.post-27316498442865400052011-09-07T20:18:04.491+02:002011-09-07T20:18:04.491+02:00Can you please help me on this. Initially LazyList...Can you please help me on this. Initially LazyList contains 2 elements and 2 rows will be shown in JSP using forEach tag in jsp. Later user is adding 2 more elements and removing 2nd element and 4th element. In such case, i believed that i will get item1, null, item3 and null. Instead i am getting item1, item2, item3 and null. How to know that item2 is removed?Gopihttps://www.blogger.com/profile/00200673034439970193noreply@blogger.comtag:blogger.com,1999:blog-603254884063001716.post-69060038937780328782011-04-01T23:19:18.195+02:002011-04-01T23:19:18.195+02:00Laurent, probably your problem could be fixed usin...Laurent, probably your problem could be fixed using the following snippet in your controller:<br /> */<br /> @InitBinder<br /> public void initBinder(WebDataBinder binder) {<br /><br /> binder.setAutoGrowNestedPaths(Boolean.FALSE);<br /> }<br /><br />"http://stackoverflow.com/questions/4657599/weird-problem-when-binding-a-dynamic-listJulio Argüellohttps://www.blogger.com/profile/17845062275900844402noreply@blogger.comtag:blogger.com,1999:blog-603254884063001716.post-48420053068746416032011-02-22T14:17:19.082+01:002011-02-22T14:17:19.082+01:00Thank for your post, but you must declare your col...Thank for your post, but you must declare your collection as List without generic types, otherwise, Spring will instanciate elements because it will grow the collection by himself if type is specified.<br /><br />The code is in BeanWrapperImpl.growCollectionIfNecessary()<br /><br />if (index >= collection.size()) {<br />Class elementType = GenericCollectionTypeResolver.getCollectionReturnType(pd.getReadMethod(), nestingLevel);<br />if (elementType != null) {<br />for (int i = collection.size(); i < index + 1; i++) {<br />collection.add(newValue(elementType, name));<br />}<br />}<br />}<br /><br />For my case, I initially have this :<br />List getContacts()<br />and now, I must have this :<br />List getContacts()<br /><br />And it works with this, but the issue is we have raw types for collection.<br /><br />Sorry for my bad english.Unknownhttps://www.blogger.com/profile/09709244632341817924noreply@blogger.comtag:blogger.com,1999:blog-603254884063001716.post-63592836539159632572011-02-22T12:02:51.860+01:002011-02-22T12:02:51.860+01:00This comment has been removed by the author.Unknownhttps://www.blogger.com/profile/09709244632341817924noreply@blogger.comtag:blogger.com,1999:blog-603254884063001716.post-9179882569124381682011-02-02T20:29:41.559+01:002011-02-02T20:29:41.559+01:00The only source code related to this article is th...The only source code related to this article is the ShrinkableLazyList class, which is completely shown in the content.l0cohttps://www.blogger.com/profile/12633925472794511454noreply@blogger.comtag:blogger.com,1999:blog-603254884063001716.post-52013074742573632072011-02-02T16:19:44.511+01:002011-02-02T16:19:44.511+01:00Can you post sources please?Can you post sources please?Викторhttps://www.blogger.com/profile/12114772823884084547noreply@blogger.com