Tuesday, September 7, 2010

Bit #23 - Using findAndSetCurrentRowByKey() to set the View Object currency

You can set the currency on a View Object (VO) by calling its findAndSetCurrentRowByKey() method. The method accepts two arguments: a Key object that is used to locate the row in the VO and an integer indicating the range position of row (for VOs configured with Range Paging Access Mode). Below is an example. The example saves the VO currency, queries the VO and finally restores its currency. Click on the references below to get all the details on the example.


   * Helper to requery the view.
   public void requery() {
      Row currentRow = getCurrentRow();
      Key currentRowKey = currentRow.getKey();
      int rangePosOfCurrentRow = getRangeIndexOf(currentRow);
      int rangeStartBeforeQuery = getRangeStart();


View Object Implementation Class
Application Module Implementation Class



  1. When you select row within the range paging its working fine. when you scroll row and select row it's doesn't work.

    Can you share sample project/code.


Related Posts Plugin for WordPress, Blogger...