<?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: Finding selected checkbox items in a JSF dataTable</title>
	<atom:link href="http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/</link>
	<description>Technology, code, and thoughts by Stevi Deter</description>
	<lastBuildDate>Thu, 15 Dec 2011 15:20:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Anshul</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-31576</link>
		<dc:creator>Anshul</dc:creator>
		<pubDate>Thu, 15 Dec 2011 08:47:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-31576</guid>
		<description>(refering to comment no. 18)

Novino,
i have also got the same problem, i am working on it...if anyone else knows the solution then please help.

This is Exception:
Dec 15, 2011 1:53:31 PM javax.faces.event.MethodExpressionActionListener processAction
SEVERE: Received &#039;java.lang.NullPointerException&#039; when invoking action listener &#039;#{Shop.submitSelections}&#039; for component &#039;j_id_jsp_1988918580_18&#039;
Dec 15, 2011 1:53:31 PM javax.faces.event.MethodExpressionActionListener processAction
SEVERE: java.lang.NullPointerException
	at com.Shop.submitSelections(Shop.java:26)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.el.parser.AstValue.invoke(AstValue.java:172)
	at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
	at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
	at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:99)
	at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
	at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:771)
	at javax.faces.component.UICommand.broadcast(UICommand.java:372)
	at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
	at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
	at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
	at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)

And This is my Shop.java
package com;

import java.util.ArrayList;

import javax.faces.event.ActionEvent;
import javax.faces.model.DataModel;

public class Shop {
	
	 private DataModel selectableItems;
	 ArrayList items;
	 ArrayList selectedItems;
	 
	public String addToCart()
	{
		
	    items = (ArrayList)selectableItems.getWrappedData();
		
	    selectedItems = new ArrayList();
		
		for (ProductModel item : items) {
	      if (item.getChecked()) {
	        selectedItems.add(item);
	        System.out.print(&quot;\n\nproduct added to cart=&quot;+item.desc+&quot;\n\n&quot;);
	      }
	      else{
		        selectedItems.remove(item);
		        System.out.print(&quot;\n\nproduct removed from cart=&quot;+item.desc+&quot;\n\n&quot;);
	      }
	    }
		return &quot;add_to_cart&quot;; 		
	  }
	public ArrayList getSelectedItems() {
		return selectedItems;
	}
	public void setSelectedItems(ArrayList selectedItems) {
		this.selectedItems = selectedItems;
	}


}</description>
		<content:encoded><![CDATA[<p>(refering to comment no. 18)</p>
<p>Novino,<br />
i have also got the same problem, i am working on it&#8230;if anyone else knows the solution then please help.</p>
<p>This is Exception:<br />
Dec 15, 2011 1:53:31 PM javax.faces.event.MethodExpressionActionListener processAction<br />
SEVERE: Received &#8216;java.lang.NullPointerException&#8217; when invoking action listener &#8216;#{Shop.submitSelections}&#8217; for component &#8216;j_id_jsp_1988918580_18&#8242;<br />
Dec 15, 2011 1:53:31 PM javax.faces.event.MethodExpressionActionListener processAction<br />
SEVERE: java.lang.NullPointerException<br />
	at com.Shop.submitSelections(Shop.java:26)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
	at java.lang.reflect.Method.invoke(Method.java:597)<br />
	at org.apache.el.parser.AstValue.invoke(AstValue.java:172)<br />
	at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)<br />
	at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)<br />
	at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:99)<br />
	at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)<br />
	at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:771)<br />
	at javax.faces.component.UICommand.broadcast(UICommand.java:372)<br />
	at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)<br />
	at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)<br />
	at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)<br />
	at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)<br />
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)<br />
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)<br />
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)<br />
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)<br />
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)<br />
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br />
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)<br />
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)<br />
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)<br />
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)<br />
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br />
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)<br />
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)<br />
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)<br />
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)<br />
	at java.lang.Thread.run(Thread.java:619)</p>
<p>And This is my Shop.java<br />
package com;</p>
<p>import java.util.ArrayList;</p>
<p>import javax.faces.event.ActionEvent;<br />
import javax.faces.model.DataModel;</p>
<p>public class Shop {</p>
<p>	 private DataModel selectableItems;<br />
	 ArrayList items;<br />
	 ArrayList selectedItems;</p>
<p>	public String addToCart()<br />
	{</p>
<p>	    items = (ArrayList)selectableItems.getWrappedData();</p>
<p>	    selectedItems = new ArrayList();</p>
<p>		for (ProductModel item : items) {<br />
	      if (item.getChecked()) {<br />
	        selectedItems.add(item);<br />
	        System.out.print(&#8220;\n\nproduct added to cart=&#8221;+item.desc+&#8221;\n\n&#8221;);<br />
	      }<br />
	      else{<br />
		        selectedItems.remove(item);<br />
		        System.out.print(&#8220;\n\nproduct removed from cart=&#8221;+item.desc+&#8221;\n\n&#8221;);<br />
	      }<br />
	    }<br />
		return &#8220;add_to_cart&#8221;;<br />
	  }<br />
	public ArrayList getSelectedItems() {<br />
		return selectedItems;<br />
	}<br />
	public void setSelectedItems(ArrayList selectedItems) {<br />
		this.selectedItems = selectedItems;<br />
	}</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zeeshan Akhter</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-29137</link>
		<dc:creator>zeeshan Akhter</dc:creator>
		<pubDate>Wed, 02 Nov 2011 10:11:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-29137</guid>
		<description>its really good ........ 
but i want to delete and update selected items from database using &lt;h:selectBooleanCheckbox
in &lt;h:datamodel tel me how i do that........</description>
		<content:encoded><![CDATA[<p>its really good &#8230;&#8230;..<br />
but i want to delete and update selected items from database using &lt;h:selectBooleanCheckbox<br />
in &lt;h:datamodel tel me how i do that&#8230;&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sirisha</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-22642</link>
		<dc:creator>Sirisha</dc:creator>
		<pubDate>Thu, 16 Jun 2011 15:57:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-22642</guid>
		<description>Hi,

When i tried to add items to javax.faces.model.ListDataModel object, it is showing a compile time error saying &#039;add&#039; method is not supported.

Can you please let me know how can items be added to ListDataModel object.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>When i tried to add items to javax.faces.model.ListDataModel object, it is showing a compile time error saying &#8216;add&#8217; method is not supported.</p>
<p>Can you please let me know how can items be added to ListDataModel object.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neha</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-19339</link>
		<dc:creator>Neha</dc:creator>
		<pubDate>Wed, 16 Mar 2011 09:57:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-19339</guid>
		<description>I really liked the example. It helped me a lot when i was stuck in that piece of code</description>
		<content:encoded><![CDATA[<p>I really liked the example. It helped me a lot when i was stuck in that piece of code</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Butterfly07</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-13583</link>
		<dc:creator>Butterfly07</dc:creator>
		<pubDate>Wed, 08 Sep 2010 07:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-13583</guid>
		<description>How to get the jar  com.stevideter.manager.DomainManager?????</description>
		<content:encoded><![CDATA[<p>How to get the jar  com.stevideter.manager.DomainManager?????</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sathish</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-12187</link>
		<dc:creator>Sathish</dc:creator>
		<pubDate>Mon, 28 Jun 2010 06:00:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-12187</guid>
		<description>Thanks to all articles and comments , it is very much useful for fresh developers and most of others 

thanks a lot , keep posting like wise articles</description>
		<content:encoded><![CDATA[<p>Thanks to all articles and comments , it is very much useful for fresh developers and most of others </p>
<p>thanks a lot , keep posting like wise articles</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous Coward</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-11947</link>
		<dc:creator>Anonymous Coward</dc:creator>
		<pubDate>Tue, 15 Jun 2010 22:45:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-11947</guid>
		<description>Thank you! Saved me probably 25 minutes of thinking.</description>
		<content:encoded><![CDATA[<p>Thank you! Saved me probably 25 minutes of thinking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stevi</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-11939</link>
		<dc:creator>stevi</dc:creator>
		<pubDate>Tue, 15 Jun 2010 17:03:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-11939</guid>
		<description>novino,
I&#039;d look at your UserBean.java file at line 298 and figure out why it&#039;s throwing a null pointer exception.</description>
		<content:encoded><![CDATA[<p>novino,<br />
I&#8217;d look at your UserBean.java file at line 298 and figure out why it&#8217;s throwing a null pointer exception.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: novino</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-11937</link>
		<dc:creator>novino</dc:creator>
		<pubDate>Tue, 15 Jun 2010 14:49:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-11937</guid>
		<description>Hi  Stevi,

I tried the same but I&#039;m getting following Exception.  Do you have any suggestion on this.

Thanks.


java.lang.NullPointerException
        at com.geae.empis.bean.UserBean.deletePan(UserBean.java:298)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
        at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
        at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
        at javax.faces.component.UICommand.broadcast(UICommand.java:387)
        at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
        at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
        at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
        at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
        at java.lang.Thread.run(Thread.java:595)</description>
		<content:encoded><![CDATA[<p>Hi  Stevi,</p>
<p>I tried the same but I&#8217;m getting following Exception.  Do you have any suggestion on this.</p>
<p>Thanks.</p>
<p>java.lang.NullPointerException<br />
        at com.geae.empis.bean.UserBean.deletePan(UserBean.java:298)<br />
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
        at java.lang.reflect.Method.invoke(Method.java:585)<br />
        at org.apache.el.parser.AstValue.invoke(AstValue.java:131)<br />
        at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)<br />
        at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)<br />
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88<br />
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)<br />
        at javax.faces.component.UICommand.broadcast(UICommand.java:387)<br />
        at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)<br />
        at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)<br />
        at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)<br />
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)<br />
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)<br />
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)<br />
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)<br />
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)<br />
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br />
        at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)<br />
        at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)<br />
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br />
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br />
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)<br />
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)<br />
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)<br />
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)<br />
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br />
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)<br />
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)<br />
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)<br />
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)<br />
        at java.lang.Thread.run(Thread.java:595)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geraldo Luiz</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-9062</link>
		<dc:creator>Geraldo Luiz</dc:creator>
		<pubDate>Thu, 14 Jan 2010 21:01:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-9062</guid>
		<description>I use a similar aproach. But, like you, I&#039;m also not very fond of messing with my domain objects, introducing an artificial atribute that doesn&#039;t belong there.

Maybe it&#039;s possible to extend the DataModel abstract class as a MultipleSelectionEntityDataModel or something like that. The default DataModel (and its derived concrete classes) models a single selection collection, so we must add methods to get and set the selected rows indexes, and the implementation of the getRowIndex() and setRowIndex() abstract methods may return, for example, the first selected one.

It&#039;s just a thought. I will play with this idea, when I have a spare time, and I inform here if I have any success sith this aproach.</description>
		<content:encoded><![CDATA[<p>I use a similar aproach. But, like you, I&#8217;m also not very fond of messing with my domain objects, introducing an artificial atribute that doesn&#8217;t belong there.</p>
<p>Maybe it&#8217;s possible to extend the DataModel abstract class as a MultipleSelectionEntityDataModel or something like that. The default DataModel (and its derived concrete classes) models a single selection collection, so we must add methods to get and set the selected rows indexes, and the implementation of the getRowIndex() and setRowIndex() abstract methods may return, for example, the first selected one.</p>
<p>It&#8217;s just a thought. I will play with this idea, when I have a spare time, and I inform here if I have any success sith this aproach.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

