Forum Stats

  • 3,826,874 Users
  • 2,260,716 Discussions
  • 7,897,108 Comments

Discussions

Not able to get the selected row!

user13299787
user13299787 Member Posts: 4
edited Jun 25, 2010 12:48AM in JDeveloper and ADF
Hi,

I'm using Jdev 11.1.1.3 for developing ADF (mobile) application that makes uses of trinidad components.

I am coming across the problem of not obtaining the selected row from the trinidad table component. Below is the scenario of implementation.

What is the datacontrol made of?
======================
Web services (xml) are provided, from which the data control is being created. The web service expects certain input parameters. This DC is dropped onto JSPX page as trinidad read-only table component.


Are there any backing beans?
====================
Yes, there is backing bean associated with the page. This backing bean extends a custom bean which implements PagePhaseListener. This custom bean is registered in adf-settings.xml file.

The reason for implementing the custom listener was to obtain the onPageLoad() method wherein i could write some code which sets certain values to input parameters.


What is happening?
============
1. The first load happens and data is displayed as per the provided parameters.
2. Select required row and click 'Go To'. The button invokes a method in the backing bean where I try to access the row. I always get the first row!!! I have tried different codes (by googling) for obtaining the row but none seem to work. The row currency itself isn't changing.

Note:
====
I have not changed anything in the pagedef level. I tried working with the 'refresh' condition but got me no good.

One more thing. Under the mentioned scenario, the onPageload() gets executed twice? First when the page loads (of course it should) and next when the button is clicked (?).


Any help is immensely appreciated.


Wishes,
Shishir.nc
Tagged:

Answers

  • BRM
    BRM Member Posts: 115
    Hi,

    since you implements the backing bean from PagePhaseListener. some where the same view is excuting before getting the selected record. Even if you select the record after excuteQuery() it will set the first record as selected. Please try to check some where query is excuting.

    try give some more details like what are all the methods you are using in PagePhaseListener and where you worte u r coding.



    Reg,
    Brahma
  • 450722
    450722 Member Posts: 302
    As bRahma pointed out your pageLoad is getting called everytime page renders.

    Just to make sure: Could you try partialSubmit=true on your button and see if you get the row correct?

    On Pageload check for postback and then do not execute your logic if it is true. We did a similar thing.

    Venkat
This discussion has been closed.