0 Replies Latest reply: Jan 15, 2013 11:16 AM by User771294-Oracle RSS

    Different actions on row selection and command link action in an ADF table

    User771294-Oracle
      Hi,
      I am displaying an ADF Table where every row has a command link as one of its column. On Row selection I have to navigate to "Page A" and if I click on the command link inside any row I have to navigate to 'Page B'. However when I click on the command link in any row other than the selected one there are two requests being fired in the following order:
      1) RowSelectionListener of the table.
      2) Action listener of the command link.

      So I am not able to navigate to 'Page B' in any scenario as row seleciton event is fired first and the flow navigates to 'Page A'. I have tried the following approaches till now:

      1) Add setActionListener on the Command link and set some pageFlowScope variable and try to check its value in the RowSelectionListener. However this value is available after the SelectionListener method is over.

      2) Add the RowSelectionEvent in the Event queue (basically calling event.queue() itself in the managed bean and making it sure it is executed once completely) thinking that it would be added after command link Action Listener in the queue. However it is executed immediately again ( may be because these are two different requests... or framework would be processing events for one component all in one go ... I am not sure)

      3) Add a javascript method in the jsff for the commandlink which is executed on the client side and set the table's empty text to something else. Now I check in the bean's RowSelectionListener for the updated value of the empty text, but it still contains the old value. Only when the Action Listener is fired the empty text changes for the table in the bean.

      Also if I add javascript on both rowseleciton and clickevent in the jsff, only rowselection listener executed on the client.

      I am trying this approach now : add a javascript through bean in the RowSelectionListener method to check for the modified empty text of the table on the client side and call some server side method. Not sure if it will work.

      I need some pointers in this direction. Is there a way of setting some request variable through java script or a way to know all the events in the pipeline so that we know in advance that the Action Listener is also gonna be processed in the future.

      Thanks in advance.

      Vineet

      Edited by: user771294 on Jan 15, 2013 9:16 AM