Scenario:
How to enable single row table selection?
Solution:
This seems an obvious question but newbie’s miss to understand this and will find difficulties in fixing this.
So what exactly we do to make the selection happen and confirm that it points to the current row of the af:table.
first, make sure that you have the following entries added to the af:table component of your page
selectedRowKeys="{bindings.Customers.collectionModel.selectedRow}" selectionListener="#{bindings.Customers.collectionModel.makeCurrent}" rowSelection="single"
Note: Customers is the tree binding for the table in the page definition file.
So what these entries do?
selectedRowKeys – the state of the selection is stored in this property. This property identifies the current selected row in the collectionModel of the table.
selectionListener – this is a listener that corresponds to the selection of the row. we bind it to the makeCurrent method of the table bindings collectionModel
rowSelection – we make it single row selection.
Actually its not a missing feartue but an ugly written section in the security guide. The following three sentences – copied from the same doc – explain how it really works1) “ADF Security does not perform permission checking for ADF methods; you must enable permission checking in your application. Based on a resource permission you have granted to the user for the ADF method, the user interface will either enable or disable the command component.”2) “You create a resource permission to map the invoke permission action to the execute operation.” This means that you press the plus icon for ADF method in the security editor to create a new Resource permission. This resource permission is what you then create instance of and grant to users. Doing so then gives sense to (3)3) “You use the Expression Builder dialog that you display for the UI component display property to define an EL expression that checks the user’s access rights to the method. When you run the application, the component will appear either enabled or disabled based on the outcome of the EL expression ADF method permission check.”The problem is that “ADF Method” neglects the fact that it is a resource permission. When the doc author talks about selecting an ADF method then he doesn’t mean to select a method in a PageDef file but a Resource Permission defined as an ADF Method (confusing, I know).I’ll file a bug to get this explained
I really found this specific blog post , “How to in Jdeveloper
ADF-Single row table selection | They point the finger at me.
. again!”, relatively pleasurable plus the blog post was in fact a superb read.
Thanks for your time-Gay
“How to in Jdeveloper ADF-Single row table selection | They point the
finger at me.. again!” was a great post and I really ended up being quite satisfied to locate the blog.
Thanks for your effort,Ned
This post, “How to in Jdeveloper ADF-Single row table
selection | They point the finger at me.. again!
” indicates that u actually fully understand what
you’re writing about! I personally completely am in agreement. With thanks -Sven
I actually want to know the reason you called this particular article, “How to in
Jdeveloper ADF-Single row table selection | They
point the finger at me.. again!”. In any event I really admired it!
Thanks a lot,Naomi
I had to share this specific posting, “How to in Jdeveloper ADF-Single row table
selection | They point the finger at me.. again!”
with my personal friends on facebook .com. Imerely sought to disperse your tremendous writing!
Thank you, Deloris
“How to in Jdeveloper ADF-Single row table selection | They point the finger at me.
. again!” genuinely makes myself contemplate a somewhat further.
I actually enjoyed each and every single component of it.
Thank you -Tabitha