<?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>Tue, 31 Aug 2010 16:12:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<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>
	<item>
		<title>By: Rajneesh</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-4303</link>
		<dc:creator>Rajneesh</dc:creator>
		<pubDate>Wed, 15 Jul 2009 08:57:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-4303</guid>
		<description>We are also using the same approach. But, this approach has a problem 

e.g. you have a list of 10 items, and you used same approach to select the fist time and then perform a delete operation on that. 

Now, once this is done and we have left 9 items in the list. Suppose, you press F5 from IE browser, now image what will be happen? 

It sends, the request again to the server and tables sets again the first time selected because it is on the same index and gets deleted as well. 

I am trying to figure out how to resolve this problem, within same approach.</description>
		<content:encoded><![CDATA[<p>We are also using the same approach. But, this approach has a problem </p>
<p>e.g. you have a list of 10 items, and you used same approach to select the fist time and then perform a delete operation on that. </p>
<p>Now, once this is done and we have left 9 items in the list. Suppose, you press F5 from IE browser, now image what will be happen? </p>
<p>It sends, the request again to the server and tables sets again the first time selected because it is on the same index and gets deleted as well. </p>
<p>I am trying to figure out how to resolve this problem, within same approach.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thachthao</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-2360</link>
		<dc:creator>thachthao</dc:creator>
		<pubDate>Mon, 25 May 2009 15:31:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-2360</guid>
		<description>can you tell me how to display list  on jsf page. I have the list String and want to display each element on jsf throught datatable</description>
		<content:encoded><![CDATA[<p>can you tell me how to display list  on jsf page. I have the list String and want to display each element on jsf throught datatable</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thachthao</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-2358</link>
		<dc:creator>thachthao</dc:creator>
		<pubDate>Mon, 25 May 2009 15:24:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-2358</guid>
		<description>please tell me the way to do datatable contain together.</description>
		<content:encoded><![CDATA[<p>please tell me the way to do datatable contain together.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: varun</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-972</link>
		<dc:creator>varun</dc:creator>
		<pubDate>Fri, 13 Mar 2009 09:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-972</guid>
		<description>Piece of code was very useful, could you plz also tell, way to refersh data table with new data.</description>
		<content:encoded><![CDATA[<p>Piece of code was very useful, could you plz also tell, way to refersh data table with new data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: emilio norrmann</title>
		<link>http://www.stevideter.com/2008/10/09/finding-selected-checkbox-items-in-a-jsf-datatable/comment-page-1/#comment-706</link>
		<dc:creator>emilio norrmann</dc:creator>
		<pubDate>Wed, 21 Jan 2009 11:31:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevideter.com/?p=35#comment-706</guid>
		<description>very useful ! 
thanks a lot</description>
		<content:encoded><![CDATA[<p>very useful !<br />
thanks a lot</p>
]]></content:encoded>
	</item>
</channel>
</rss>
