<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Building a ListEditor form component</title>
	<atom:link href="http://wicketinaction.com/2008/10/building-a-listeditor-form-component/feed/" rel="self" type="application/rss+xml" />
	<link>http://wicketinaction.com/2008/10/building-a-listeditor-form-component/</link>
	<description>A comprehensive guide for Java developers building Wicket-based web applications</description>
	<lastBuildDate>Tue, 22 Nov 2011 11:29:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: ivaynberg</title>
		<link>http://wicketinaction.com/2008/10/building-a-listeditor-form-component/comment-page-1/#comment-968</link>
		<dc:creator>ivaynberg</dc:creator>
		<pubDate>Tue, 17 May 2011 15:38:45 +0000</pubDate>
		<guid isPermaLink="false">http://wicketinaction.com/?p=228#comment-968</guid>
		<description>@amango, its actually pretty easy - see here: http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/</description>
		<content:encoded><![CDATA[<p>@amango, its actually pretty easy &#8211; see here: <a href="http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/" rel="nofollow">http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amango</title>
		<link>http://wicketinaction.com/2008/10/building-a-listeditor-form-component/comment-page-1/#comment-967</link>
		<dc:creator>amango</dc:creator>
		<pubDate>Tue, 17 May 2011 06:51:37 +0000</pubDate>
		<guid isPermaLink="false">http://wicketinaction.com/?p=228#comment-967</guid>
		<description>i wonder how easy is it to make the add and remove buttons do Ajax call? i have other controls on top of the page, and every time after add/remove, it goes back to the top of the page.</description>
		<content:encoded><![CDATA[<p>i wonder how easy is it to make the add and remove buttons do Ajax call? i have other controls on top of the page, and every time after add/remove, it goes back to the top of the page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://wicketinaction.com/2008/10/building-a-listeditor-form-component/comment-page-1/#comment-666</link>
		<dc:creator>James</dc:creator>
		<pubDate>Wed, 17 Mar 2010 16:59:01 +0000</pubDate>
		<guid isPermaLink="false">http://wicketinaction.com/?p=228#comment-666</guid>
		<description>Great article - is there a way to modify it to display the items without text boxes until you click on them, kind of like an example you have in the book?
Thanks,
-jim</description>
		<content:encoded><![CDATA[<p>Great article &#8211; is there a way to modify it to display the items without text boxes until you click on them, kind of like an example you have in the book?<br />
Thanks,<br />
-jim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://wicketinaction.com/2008/10/building-a-listeditor-form-component/comment-page-1/#comment-593</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Thu, 24 Sep 2009 06:18:27 +0000</pubDate>
		<guid isPermaLink="false">http://wicketinaction.com/?p=228#comment-593</guid>
		<description>I&#039;m getting this error:

java.lang.UnsupportedOperationException: Model class x.x.x.listeditor.ListEditorItem$ListItemModel does not support setObject(Object)
at org.apache.wicket.model.AbstractReadOnlyModel.setObject(AbstractReadOnlyModel.java:55)
     at org.apache.wicket.Component.setDefaultModelObject(Component.java:3052)
     at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1168)</description>
		<content:encoded><![CDATA[<p>I&#8217;m getting this error:</p>
<p>java.lang.UnsupportedOperationException: Model class x.x.x.listeditor.ListEditorItem$ListItemModel does not support setObject(Object)<br />
at org.apache.wicket.model.AbstractReadOnlyModel.setObject(AbstractReadOnlyModel.java:55)<br />
     at org.apache.wicket.Component.setDefaultModelObject(Component.java:3052)<br />
     at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1168)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ivaynberg</title>
		<link>http://wicketinaction.com/2008/10/building-a-listeditor-form-component/comment-page-1/#comment-561</link>
		<dc:creator>ivaynberg</dc:creator>
		<pubDate>Thu, 30 Jul 2009 16:59:51 +0000</pubDate>
		<guid isPermaLink="false">http://wicketinaction.com/?p=228#comment-561</guid>
		<description>@John: Remember, the whole point of the ListEditor was that submit is atomic. The problem, I would guess, is that you use a regular TabbedPanel which uses a regular anchor link to switch tabs. That means the form is not submitted.

There are two ways to solve it:

a) Override tabbedpanel&#039;s newLink() factory and return a SubmitLink instead - this will submit the form between tab switches.

b) Use a javascript tab panel instead so that everything is still kept on the same page.</description>
		<content:encoded><![CDATA[<p>@John: Remember, the whole point of the ListEditor was that submit is atomic. The problem, I would guess, is that you use a regular TabbedPanel which uses a regular anchor link to switch tabs. That means the form is not submitted.</p>
<p>There are two ways to solve it:</p>
<p>a) Override tabbedpanel&#8217;s newLink() factory and return a SubmitLink instead &#8211; this will submit the form between tab switches.</p>
<p>b) Use a javascript tab panel instead so that everything is still kept on the same page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://wicketinaction.com/2008/10/building-a-listeditor-form-component/comment-page-1/#comment-556</link>
		<dc:creator>John</dc:creator>
		<pubDate>Sat, 25 Jul 2009 15:48:35 +0000</pubDate>
		<guid isPermaLink="false">http://wicketinaction.com/?p=228#comment-556</guid>
		<description>Also, now when I switch tabs any updates get lost unless I have submitted the whole form. This is not very intuitive for the user as the tabs really just split up a very very long form which has many parts that are optional.</description>
		<content:encoded><![CDATA[<p>Also, now when I switch tabs any updates get lost unless I have submitted the whole form. This is not very intuitive for the user as the tabs really just split up a very very long form which has many parts that are optional.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://wicketinaction.com/2008/10/building-a-listeditor-form-component/comment-page-1/#comment-553</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 24 Jul 2009 15:39:03 +0000</pubDate>
		<guid isPermaLink="false">http://wicketinaction.com/?p=228#comment-553</guid>
		<description>I had this working fine when everything was on a single page. I also used the above example to make it work with lists of strings.

Then I separated different parts of the form into panels on tabs. Now that it is in a panel the add button does not update its model so always adds an empty string.

I don&#039;t see why it should behave differently. Any ideas?

The hierachy was..
form-&gt;listeditor stuff

The hierarchy is now..
form-&gt;tabbedpanel-&gt;panel-&gt;listeditor stuff

Maybe there is another problem with forms separated into panels but wizards do this fine..

Help!</description>
		<content:encoded><![CDATA[<p>I had this working fine when everything was on a single page. I also used the above example to make it work with lists of strings.</p>
<p>Then I separated different parts of the form into panels on tabs. Now that it is in a panel the add button does not update its model so always adds an empty string.</p>
<p>I don&#8217;t see why it should behave differently. Any ideas?</p>
<p>The hierachy was..<br />
form-&gt;listeditor stuff</p>
<p>The hierarchy is now..<br />
form-&gt;tabbedpanel-&gt;panel-&gt;listeditor stuff</p>
<p>Maybe there is another problem with forms separated into panels but wizards do this fine..</p>
<p>Help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ivaynberg</title>
		<link>http://wicketinaction.com/2008/10/building-a-listeditor-form-component/comment-page-1/#comment-546</link>
		<dc:creator>ivaynberg</dc:creator>
		<pubDate>Fri, 10 Jul 2009 04:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://wicketinaction.com/?p=228#comment-546</guid>
		<description>@garz: Because we want all changes to the list to be comitted atomically when the form is submitted we make a copy of the actual list backing the model.

If we did not do this then operations such as move up and move down, for example, would immediately affect the model object before the form was submitted.</description>
		<content:encoded><![CDATA[<p>@garz: Because we want all changes to the list to be comitted atomically when the form is submitted we make a copy of the actual list backing the model.</p>
<p>If we did not do this then operations such as move up and move down, for example, would immediately affect the model object before the form was submitted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: garz</title>
		<link>http://wicketinaction.com/2008/10/building-a-listeditor-form-component/comment-page-1/#comment-545</link>
		<dc:creator>garz</dc:creator>
		<pubDate>Thu, 09 Jul 2009 15:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://wicketinaction.com/?p=228#comment-545</guid>
		<description>hi ivaynberg,

at first i want to thank you for this article. i have the book &quot;wicket in action&quot; and there it isnt explained the same way as it is here and i have the feeling, this solution is nicer than the one in the book. thank you very much!

i have one question. in the ListEditor-class in the method onBeforeRender() you set the items-attribute like this:
items = new ArrayList(getModelObject());
why not doing it like this:
items = getModelObject();
why do you create a new ArrayList-object? is it because the constructor supports the more general interface Collection? if so, why not using Collection as the type for the items-attribute?

just asking because i dont want to miss something. maybe there is something i dont understand.

thank you and keep the good work up. :)</description>
		<content:encoded><![CDATA[<p>hi ivaynberg,</p>
<p>at first i want to thank you for this article. i have the book &#8220;wicket in action&#8221; and there it isnt explained the same way as it is here and i have the feeling, this solution is nicer than the one in the book. thank you very much!</p>
<p>i have one question. in the ListEditor-class in the method onBeforeRender() you set the items-attribute like this:<br />
items = new ArrayList(getModelObject());<br />
why not doing it like this:<br />
items = getModelObject();<br />
why do you create a new ArrayList-object? is it because the constructor supports the more general interface Collection? if so, why not using Collection as the type for the items-attribute?</p>
<p>just asking because i dont want to miss something. maybe there is something i dont understand.</p>
<p>thank you and keep the good work up. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: L'engin</title>
		<link>http://wicketinaction.com/2008/10/building-a-listeditor-form-component/comment-page-1/#comment-509</link>
		<dc:creator>L'engin</dc:creator>
		<pubDate>Mon, 08 Jun 2009 08:04:27 +0000</pubDate>
		<guid isPermaLink="false">http://wicketinaction.com/?p=228#comment-509</guid>
		<description>Ok, cool!

I used the FormComponentPanel method you suggested. It took a bit (ok a lot) of fumbling with details to get it to work, but now that it&#039;s done, works like a charm. Also, other than a few things (like have to use getParent().iterator() instead of getParent().get(int) in the RemoveButton), most things are portable as you say.

Thanks!</description>
		<content:encoded><![CDATA[<p>Ok, cool!</p>
<p>I used the FormComponentPanel method you suggested. It took a bit (ok a lot) of fumbling with details to get it to work, but now that it&#8217;s done, works like a charm. Also, other than a few things (like have to use getParent().iterator() instead of getParent().get(int) in the RemoveButton), most things are portable as you say.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

