Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
475
How to get current active cell or cell with focus in backing bean?
posted

In backing bean, I need to retrieve information in currently active cell. Or I need to handle cell clicked event to get the row and column of the cell that is clicked by user. I couldn't find example for it.

 Thanks!

  • 1579
    Verified Answer
    posted
    Hi, yzbythesea!

    At that time the WebGrid supports three Action Listeners: sortListener, pageChangeListener, selectedRowsChangeListener. Therefore you can have accordingly three event handlers in your Backing Bean, catching SortEvents, PageChangeEvents or SelectedRowsChangeEvents. There you can use the methods of the GridView class to get the RowItems needed and to unwrap the data contained.

    An example of the use of pageChangeListener and selectedRowsChangeListener is available at our NetAdvantage for JSF Samples page under WebGrid/Row Selection. The source code is available in INSTALL_FOLDER\demos\src\main\... .

    Regards!