tag:blogger.com,1999:blog-8322364098416604606.post396254352483562488..comments2023-04-28T21:15:54.221+05:30Comments on ADF with Ejb ,ADF BC: Implementing Select One ,Select None and getting Selected row in Backing Bean of af:tableUnknownnoreply@blogger.comBlogger4125tag:blogger.com,1999:blog-8322364098416604606.post-45682241100080731192012-08-14T22:34:22.796+05:302012-08-14T22:34:22.796+05:30Thanks for your valuable information.Yes i agreed ...Thanks for your valuable information.Yes i agreed your point.Prateek Kumar shawhttps://www.blogger.com/profile/10959545409864038410noreply@blogger.comtag:blogger.com,1999:blog-8322364098416604606.post-51144680454624866552012-08-13T08:25:52.918+05:302012-08-13T08:25:52.918+05:30You get the selected rows from getSelectedRowKeys ...You get the selected rows from getSelectedRowKeys and just add an extra if condition to check if the corresponding rowindex in Map is selected. <br />Anyways as you mentioned there are different ways to approach a problem. If you have the flexibility to do modification to the EJB code, you can very well go with your approach. But sometimes you do not get that handle as some other team might design the EJB and you have to handle it in UI so in that case my approach is more relevant.<br /><br />Thanks,<br />Rakesh Rakeshhttps://www.blogger.com/profile/02562868709598980317noreply@blogger.comtag:blogger.com,1999:blog-8322364098416604606.post-83515111169078357912012-08-11T11:29:46.014+05:302012-08-11T11:29:46.014+05:30Hi ,
Rakesh I agreed what you has written.But here...Hi ,<br />Rakesh I agreed what you has written.But here we also need to get the selected rows as well.means regardless select and deselect features we also need to have to get selected rows at a time.That is reason why i used value change listener.Prateek Kumar shawhttps://www.blogger.com/profile/10959545409864038410noreply@blogger.comtag:blogger.com,1999:blog-8322364098416604606.post-1872533885301994612012-08-11T00:17:13.993+05:302012-08-11T00:17:13.993+05:30Dude Why do you need a transient attribute from th...Dude Why do you need a transient attribute from the model layer. You are handling everything on the UI i.e using pageFlowScope Map. You can very well add a column with checkbox. Just have a Map which is initialized with the number of rows present (getEstimatedRowCount on the table)when the page is rendered and set it in pageFlowScope. The Map will take rowIndex as the key and the boolean selection as value. Provide the checkbox value as #{pageFlowScope.urMap[rowIndex.index]}, where rowIndex is the varStatus value on table. This way you need not have a value change listener.<br />For Select All & De Select All have two methods defined which will iterate over the Map and set the values to true or false. And a partialTarget on the table and it will show you all selected/deselected. <br /><br />Thanks,<br />RakeshRakeshhttps://www.blogger.com/profile/02562868709598980317noreply@blogger.com