How to auto scroll a table to last row when using Active Data Service?  11g

Hi all,
Has anyone got any experience with the ADF Active Data Service?
I am using an af:table in combination with the ADF Active Data Service and I want the table to scroll to the latest row when new data arrives.
It is basically a simple setup:
The value attribute of my table points to a bean that extends CollectionModel and implements ActiveDataModel. This works perfectly. A soon as I receive new data in my bean, the table is automatically updated (e.g. a new row is inserted). I use JDev version: 11.1.1.3
The problem is that I can not get the scroll bar to move down to the last row automatically when new data arrives. The auto scroll only works for the client that actually performs a submit. In other words the person that submits the new data, will see his scrollbar move down, this is because I added the following code:
RowKeySet rowkeysset = chatTableBinding.getSelectedRowKeys();
rowkeysset.clear();
rowkeysset.add(getRowKey());
AdfFacesContext.getCurrentInstance().addPartialTarget(this.chatTableBinding);
This does not work for the clients that receive the new data via the Active data model. Apparently the active data service partially refreshes the table, but not in such a way that it sets the selected row to the last row?
My table definition:
<af:table value="#{pageFlowScope.chatBean.instantMessagingChatwindowBean}" var="row"
id="t1" columnStretching="last" rows="10"
styleClass="AFStretchWidth" autoHeightRows="10" contentDelivery="immediate"
horizontalGridVisible="false"
verticalGridVisible="false"
disableColumnReordering="true" displayRow="last"
rowSelection="single"
binding="#{pageFlowScope.chatBean.instantMessagingChatwindowBean.chatTableBinding}"
inlineStyle="height:80px;">
p.s.
The table is used to show incoming chat message.
I am building a chat client (taskflow) in a Webcenter application. The concept is similar of that presented by Lucas Jellemain in his blogpost on building a Google Talk Client http://www.oracle.com/technetwork/articles/jellema-googletalk-094343.html

Dan,
This is a thanks for posting your findings. You saved me quite some time.
<af:selectBooleanCheckbox id="showOnlyActiveSubscriptions" selected="true"
label="Show only active services:"
value="#{servicePortfolioBean.showOnlyActiveSubscriptions}"
autoSubmit="true" />
<af:table binding="#{servicePortfolioBean.serviceTable}" ...
partialTriggers="showOnlyActiveSubscriptions">
Of course, when I add a "ValueChangeListener" to the selectBooleanCheckbox, the PPR stops working. :( I wonder why?

Similar Messages

  • How to refresh a  region using Active Data Service

    Hi,
    I need to refresh the region using ADS.
    I am creating jsff which contains dynamic tables rendering. This jsff is bound to a task flow (having input parameter and refresh property set to "ifNeeded). The bounded task flow is dropped on a jspx as a region.
    Now in order to refresh the region, I need to pass the updated param value, which would cause the region refresh.
    I am able to do so on a button click from jspx page. But I have to make it auto refresh using ADS as per app requirement.
    The issue is "AdfFacesContext.getCurrentInstance return null..if I am using it in startActive Data or changeData Update (where I am using ActiveDataUpdateEvent)".
    Please guide me how can I achieve this.
    I am using Jdev 11.1.1.4.
    Thanks.
    Edited by: 977455 on Jan 3, 2013 7:35 PM

    Hi,
    try a variation of this blog entry: http://matthiaswessendorf.wordpress.com/2010/01/22/flexible-active-data-service/
    Instead of showing a popup, you do the following
    1. set clientComponent=true for the hidden field
    2. configured the PartialTrigger property of the region to point to the hidden component
    If this doesn't work then try this
    1. use <af:clientListener type="propertyChange" method="activeDataCallback" /> as used in the sample
    2. define an af:serverListener that points to a managed bean that has access to the region (RichRegion) instance
    3. The af:serverListener needs to be defined as a child of the outputText
    4. change "activeDataCallback" to queue the server listener event (CustomEvent)
    5. Use the managed bean to refresh the region
    Frank

  • My files, photos, email files, software programs, and all information did NOT transfer over to Mavericks (from Mt. Lion).  How do I get all my stuff to appear when using Mavericks?

    Will someone please help me?
    My files, photos, email files, software programs, calendar info, and all information did NOT transfer over to Mavericks (from Mt Lion).  How do I get all my stuff to appear when using Mavericks?
    My email did transfer over.
    Thank you.

    First click on the Apple > Logout and Log back in or restart the unit see if that solves it.  If it doesn't do you have a backup of your system prior to upgrade?  Check Disk Utility and see how much space is being used to make sure the drive wasn't somehow erased.

  • How can I make the status bar hide automatically when using safari?

    How can I make the status bar hide automatically when using safari?

    When Safari is in FullScreen mode, menu bar will be hidden.
    Safari window to fit the screen?
    Move the mouse pointer to the bottom right corner of the Safari window.
    Double arrows will appear. Drag it to resize the window to fit the screen.

  • How can I decide the size of HANA server when using DMO of SUM ?

    Hi expert,
    I want to execute DB migration from MS SQL to SAP HANA by using DMO of SUM.
    So I have a question.
    How can I decide the size of HANA server when using DMO of SUM ?
    Now I have MS SQL in windows server.
    But in order to use HANA , I have to prepare Linux server.
    I want to know How can I decide the size of this Linux server.
    Can I expect the function of data compression in HANA ?
    Thanks in advance .
    Kazuki.

    Kazuki,
    Please take attetion:
    Your linux box already created = Application server:
    Application Server
    Based on the measurements SAP doesn't expect any changes concerning CPU, memory and network requirements for the ABAP application server. This means that the existing hardware and network infrastructure can still be used. Please check the PAM (www.service.sap.com/pam) for further details.
    SAP HANA Appliance ( porvided by your hardware partner)
    Consider SAP Note recommendation for HANA Main Memory, HANA CPU and HANA Disk Space.
    Regards,
    Edinaldo Junior

  • Pse 11: How do you transfer a picture into a puzzle when using PSE 11?

    How do you transfer a picture into a puzzle when using PSE 11?

    Hello,
    because I work with PS CC I will give you some links, the first program is expressly made for PSE 11:
    PSE11: http://www.panosfx.com/commercial-free-photoshop-actions/puzzle-effects
    Here a Adobe Plugin:
    Adobe - Photoshop : For Windows : Photoshop CS5 Optional Plugins
    These links here may act as examples and maybe you cane use them too
    Create Jigsaw Puzzle Effect for Photos - Photoshop Tutorials - CSSCreme.com
    http://www.avbros.com/puzzlepro/index.html
    https://creative.adobe.com/addons/products/1069#.U_dkQ2NQQs0
    http://www.photoshopessentials.com/photo-effects/photoshop-puzzle/
    http://www.obsidiandawn.com/jigsaw-puzzle-pieces-photoshop-gimp-brushes
    Good luck!
    Hans-Günter

  • How can I show additional tab rows when using many open tabs?

    How can I show additional tab rows when using many open tabs?

    What method (code) did you use to get the Tab bar displaying in the space used for the Navigation Toolbar (location bar)?
    The Tab bar should be displayed above the Navigation Toolbar.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How do I change the speed of the cursor when using the arrow keys?

    How do I change the speed of the cursor when using the arrow keys?

    Applications folder or Apple icon > System preferences > Keyboard increase key repeat.

  • How do you stop needing to verify email password when using yahoo.att with Mac Mail

    How do you stop needing to verify email password when using yahoo.att with Mac Mail?

    Nevermind, I fixed it (I think).  I went into Settings | Accounts & Sync and found Yahoo at the bottom of the list (alphabetically).  I selected it and it had an optiion to delete the account, which I did.

  • How to manage scrolling in Table Control

    Hi,
    I have one scenario in which i have one table control in that one column contains check boxes. After i check, some check boxes in  some rows and press scrolling button means the selection previously made goes off. I want the selection remains selected.
    Please any one suggest me how to manage this.
    Regards,
    Mithun.

    Your PAI flow logic should be following this type of structure:
    process after input.
      module at_exit_command at exit-command. "don't exit here if you want TC data changes
      module d9999_before_tc.
      loop with control tc_9999.
        chain.
          field:
            gs_9999_tc-sel,
            gs_9999_tc-checkbox.
          module d9999_line_tc_handler.  "hold onto TC row data in here
        endchain.
      endloop.
      module d9999_user_command. 
      module d9999_pai_scroll.  "scroll the table control
    As noted above, you need to catch the values of your checkboxes within the loop / endloop for the table control, and do any scrolling after this.
    Jonathan

  • How to auto scroll from top to bottom on JTable ?

    HI All.
    At the current, I use JTable is contained JScrollPane. Now, I want Jtable auto scroll from first item to bottom and when JTable scroll to bottom then Jtable will scroll bottom to top, It is loop. Who know how do this function, please help me.

    Thanks for reply
    Actually. I was code -> scroll from top to bottom on JTable. Code below But when JTable auto scroll then screen is not smooth.
    Please help How to workground for this problem
    private void scrollTopToBottom() {
                   try {
                        JViewport viewport = flexGrid.getViewport();
                        int heightViewport = viewport.getViewSize().height;
                        while(moveY < heightViewport) {
                             synchronized (this) {
                                  while (suspended)
                                       this.wait();
                                  if (stopped)
                                       break;
                             moveY += 10;
                             if(moveY > heightViewport) {
                                  moveY = heightViewport;
                             viewport.setViewPosition(new Point(0, moveY));
                             try {
                                  Thread.sleep(500);
                             } catch (InterruptedException e1) {
                                  e1.printStackTrace();
                             viewport.updateUI();
                   } catch (InterruptedException e) {
              }

  • Problem in SCROLLING  of TABLE CONTROL which is designed using WIZARD

    Hello Friends ,
                              I have designed a entry screen by using table control with wizard.  My table control layout  has 11 rows. I have used all 3 facilities i.e. SCROLLING , INSERT/DELETE  & SELECT/DESELECT by cheking ( ticking ) check boxes while designing table control with wizard.  
      Now i have 3 problems.
    1> In my entry screen , if 11 entries are entered , they are displayed in entry screen and are saved correctly in DB.
         But when  i copy a file of suppose 15 entries into entry screen then it displays only 11 entries in entry screen and after that  if  i click/move  VERTICAL SCROLL BAR to see remaining/next 4 entries  then it does not display  12th 13th 14th &15th entry in entry screen. So the problem is i am unable to display remaining/next 4 entries  in entry screen & also to save them DB.
    2>  At the same time when i click/move  VERTICAL SCROLL BAR to see remaining/next 4 entries  then  earlier 11 entries  are disappeared/ get cleared from entry screen.
    3> The FIRST PAGE, PREVIOUS PAGE , NEXT PAGE , LAST PAGE and INSERT , DELETE push buttons are dispalyed in my entry screen . But they are not working or doing their opertions on table control though there is system generated code for them written in module pool program and  PBO & PAI OF SCREEN 100 on which table control is present.
       So eagerly waiting for POSITIVE replies  &  Correct solutions from all ABAP techies.
    THANKS & REGARDS,
      Ashish.

    Hi friend,
                         I have visited the link u have given . But it is a report program .it is available in ABAPDOCU tcode.
    ABAPDOCU----
    >ABAP User Dialogs -
    >Screens -
    >Complex Screen Elements -
    >Table Control with Scrolling .
    It is a REPORT program. and not a module pool program. plz check this in ur link also.
    REPORT demo_dynpro_tabcont_loop.    &
    *SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.* -
    > this statement is used only in report program and system does not allow us to use in module pool program.
    Second thing here data is retrived from spfli table where as my data will be whatever enduser enters it may be 15 lines , may be 50 lines or may be 200 lines and it shold be displayed on entry screen before clicking SAVE or any other user action.
    My main problem is that I am unable to enter more than 11 entries in my entry screen. I want dynaamic table. Mean whichever enteries are entered they should be displayed on entry screen as well as can be scrolled up & down before saving and get saved after clicking SAVE button. here table control design is not imp because entry data depends on table control layout rows & which has limit. It can not be extended beyond certain level. i think max will be 20 Or 25 rows in layout. How to make it dynamic so that we can get any no. of entries in entry screen hiich canbe scrolled up & down.
    Anyways thanks for ur reply And send some other soln.
    Thanks & regards,
    Ashish

  • Hiii, i have m rows & n columns in my table..how to convert it into m columns & n rowa by using sql..pls help me...thanks.

    hiii,
    I have a table which has 14 rows & 8 cols.
    I want covert it into 14 cols & 8 rows,
    by using sql how to do it..pls help me.

    Oracle Database Search Results: pivot

  • How do you join two tables from different Oracle schemas using a subquery

    I am trying to join two tables from different Oracle schemas using a subquery. I can extract data from each of the tables without a problem. However, when I combine the select statements using a subquery I get the Oracle error *'ORA-00936: missing expression'*. Since each SELECT statement executes on its own without error I don't understand what is missing. The result set I am trying to get is to match up the LINE_ID from PDTABLE_12_1 in schema DD_12809 with the MAT_DESCRIPTION from table PDTABLE_201 in schema RA_12809.
    The query is as follows:
    sql = "SELECT [DD_12809].[PDTABLE_12_1].LINE_ID FROM [DD_12809].[PDTABLE_12_1] JOIN " _
    + "(SELECT [RA_12809].[PDTABLE_201].MAT_DESCRIPTION " _
    + "FROM [RA_12809].[PDTABLE_201]) AS FAB " _
    + "ON [DD_12809].[PDTABLE_12_1].PIPING_MATER_CLASS = FAB.PIPING_MATER_CLASS"
    The format of the query is copied from a SQL programming manual.
    I also tried executing the query using a straight JOIN on the two tables but got the same results. Any insight would be helpful. Thanks!
    Edited by: user11338343 on Oct 19, 2009 6:55 AM

    I believe you are receiving the error because you are trying to JOIN on a column that doesn't exist. For example you are trying to join on FAB.PIPING_MATER_CLASS but that column does not exist in the subquery.
    If you want to do a straight join without a subquery you could do the following
    SELECT  DD_12809.PDTABLE_12_1.LINE_ID
    ,       FAB.MAT_DESCRIPTION
    FROM    DD_12809.PDTABLE_12_1
    JOIN    RA_12809.PDTABLE_201    AS FAB ON DD_12809.PDTABLE_12_1.PIPING_MATER_CLASS = FAB.PIPING_MATER_CLASS  HTH!

  • How could I drop temporary table in preserve rows?

    Hi,
    I created a global temporary table test with the option, on commit preserve rows.
    I try to drop it with another session but I can't, I always have the error message :
    ORA-14452. So what can I do?
    Thanks.

    We cannot drop a temporary table if a session is using it. This means once a session has inserted data into it we cannot drop the table until that session either commits or exits (depending on whether the table is of the type PRESERVE ROWS). You can see this by looking in v$lock.
    If you quit out of your first session the second session will be able to drop the table.
    Cheers, APC

Maybe you are looking for

  • New to a Mac in general and having multiple issues with iTunes - Help?

    So I bought my first mac for design/marketing uses (flyers, video etc) and figured I'd consolidate my wife and I's iTunes stuff to it as well...So far most things are done but I have a few snags. In moving everything over I knew I would end up with a

  • Converting int to string, adding to string then pointing to an url

    So I'm getting a null pointer exception here's a snippet of my code (theres plus signs on both sides of the a in my code): private Image[] tiles; public Map() { for(int a=0; a<9; a++){ ImageIcon aa = new ImageIcon(this.getClass().getResource("mapsqua

  • Download failed.

    Got message "Data13.cab Error 1335 Error 2350.FDI server error."  I am not at all techie! What should I do?

  • PDF save to BLOB

    Hello All, we are using forms 10g, and there is a form in which a PDF report is created and mailed to the client. The requirement is while sending it as mail we need to save the PDF to the database, so we are uploading the file from the application s

  • Create step type for a COM step

    Hi, I'm using the COM adapter to interface with TestComplete. My current setup is I have a Master sequence file that contains two calling sequence files ( one for each test). The individual called sequence file have 4 steps as listed: Get Property: C