Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ojTable ojcurrentrowlistener only for one table

CindyBerghNov 23 2016 — edited Nov 24 2016

Hi

On my page I have two tables, they each have their own viewModel JS en view HTML, both are the same, just with different data.

<table id="customertable" summary="Customer List" aria-label="Customer Table" data-bind="ojComponent: {component: 'ojTable',

                                data: datasource,

                               selectionMode: {row: 'single'},

                                columnsDefault: {sortable: 'enabled'},

                                columns: [{headerText: 'Customer Number',   field: 'id'},

                                          {headerText: 'Customer Name', field: 'CustomerName'},

                                         ],

                                            rootAttributes: {'style':'height: 300px; width:100%;'}}" } ">

    </table>

and

    <table id="addresTable" summary="LoadPlaces list" aria-label="Loadplaces table" data-bind="ojComponent: {component: 'ojTable',

                                data: datasource,

                                selectionMode: {row: 'single'},

                                columnsDefault: {sortable: 'enabled'},

                                columns: [{headerText: 'Customer Number',  field: 'id'},

                                           {headerText: 'AddressNumber',   field: 'AddressNumber'},

                                        ],

                                            rootAttributes: {'style':'height: 300px; width:100%;'}}" } ">

    </table>

Data is showing, that all works but...

I want to listen to click events, and the first table does have a ojbeforecurrentrow event where I can act upon (as can be found in chrome developer console + it works), but the second one does not (I checked the events in the developer console as well.). How can that be?

This post has been answered by CindyBergh on Nov 24 2016
Jump to Answer
Comments
Post Details
Added on Nov 23 2016
1 comment
380 views