Useing Selection listener in table cause some Problems

Hi,
i am use jdev 11.1.1.4.0
my use case :
i have master/detail table
when the end user change data in the detail table then he click Directly to anather record in the master table
i need to show alert message ("you must save changes first") and Prevent moving, so i do Following:
in the master table i used manged bean in SelectionListener attribute called onTableSelect(SelectionEvent selectionEvent) as this:
if (ADFUtils.getApplicationModuleForDataControl("CodesModuleDataControl").getTransaction().isDirty()) {
FacesContext context = FacesContext.getCurrentInstance();
context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, getValueFromResourceBundle("hr.view.vcBundle","global.msgUnsavedChanges"), null));
*// HERE i need to move highlight to the previous record //*
else {     
RichTable table = (RichTable)selectionEvent.getSource();
CollectionModel tableModel = (CollectionModel)table.getValue();
JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding) tableModel.getWrappedData();
DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding();
Object selectedRowData = table.getSelectedRowData();
JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding) selectedRowData;
Key rwKey = nodeBinding.getRowKey();
tableIteratorBinding.setCurrentRowWithKey(rwKey.toStringFormat(true));
the code is work correctly but in the master table the highlight record Becomes Different from the itterator table,
My question is how can i move highlight record in the table according to it itterator.
Best regards

In the selectionListener you can get the previously selected rows like this:
    public void onSelectionListener(SelectionEvent selectionEvent) {
        Key removedKey = null;
        List removedkeys = null;
        RowKeySet removed = selectionEvent.getRemovedSet();
        for (Object l: removed) {
            removedkeys = (List)l;
            for (Object k: removedkeys) {
                removedKey = (Key)k;
                logger.finer("previously selected row key: " + removedKey.getAttribute(0));
        }If you want to select the above row again, you can do something like the following:
        DCIteratorBinding someiteratorIT = ADFUtils.findIterator("SomeIterator");
        someiteratorIT .setCurrentRowWithKeyValue((String)removedKey.getAttribute(0));
        getT4().setSelectedRowKeys(removed);
        AdfFacesContext.getCurrentInstance().addPartialTarget(getT4());
    }where getT4() is the RichTable.
Edited by: John on Mar 19, 2012 1:55 PM

Similar Messages

  • HT2534 hii i am using iphone 3g mobile i have some problem in downloading free apps    here is asking an credit card details    so i want to download with out entering credit cards details      and here i have there is not havening an option "NON"

    hii i am using iphone 3g mobile i have some problem in downloading free apps    here is asking an credit card details    so i want to download with out entering credit cards details      and here i have there is not havening an option "NON"

    How did you create the account ? Unless you followed, exactly, the instructions on the HT2534 page that you posted from when creating an account then credit card details will need to be entered before the account can be used to download any item from the store.

  • HT3775 I'm using version 10.7.5 OSX. I can't play or use the normal AVI recently. Some problem with (codecs version incompatible with OSX) Please give me some help. I'm in Vietnam and to have a real place to have stuffs from Apple is ****-

    I'm using version 10.7.5 OSX. I can't play or use the normal AVI recently. Some problem with (codecs version incompatible with OSX) Please give me some help. I'm in Vietnam and to have a real place to have stuffs from Apple is ****…

    I would recommend that you download and install the excellent and Free "VLCPlayer for Mac", which reads many more types of files for video than Quicktime Player:
                 http://vlc-media-player.en.softonic.com/mac

  • Yosemite is causing some problems

    Yosemite 10.10 causes some problems on my mid 2012 Mac Book Pro.  Can I downgrade back to the previous OS?

    Restore the bootable backup/clone or Time Machine backup of your previous OS.
    27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2

  • Able to install the .ipa signed with distribution certificate using iTunes on MacBook Pro. where as the when tried to install using iTune on PC is causing a problem

    Able to install the .ipa signed with distribution certificate using iTunes on MacBook Pro. where as the when tried to install using iTune on PC is causing a problem

    The sound input going to the mic is not going to pipe through the speakers like that.  It doesn't do it because it would cause a feedback loop on itself.  The mic input will take sound and output it to a program or to another pathway (like a VoIP or Facetime call, etc.) but it won't behave like a Karaoke machine if that's what you're thinking.

  • There's a strange bookmark "(no title)" with no icon in my Bookmarks Toolbar folder and I can't seem to get rid of it, plus it causes some problems.

    This "bookmark" can't be deleted nor I can choose the option "Forget About This Site" or anything else. It just won't disappear. Furthermore, when this bookmark is placed in a section (separated by separator) with other bookmarks, it causes them not to be shown in the Bookmarks Toolbar, so I have to place it in a section where there are no other bookmarks but this one, still I can't get rid of it nor know I got did it get there. I tried running Firefox in safe mode and whatnot but nothing seems to work. Please help me out.
    Thanks,
    Ed

    I should have figured that out from your original post. I think there is a possibility that your bookmarks/history database (places.sqlite) has a corrupted record. Rather than take drastic action on that immediately, could you do a test? The test is to exit Firefox, rename your existing database, and restart Firefox. Firefox should import your last bookmarks backup. You then could check whether the problem remains or whether you got a clean restore of bookmarks. After the test, assuming you prefer to retain your history, you could undo the procedure and try restoring your bookmark backup into the database to see whether that overwrites the problem record. If not, then we would go back to possible drastic action.
    '''Test procedure''':
    Open your current Firefox settings (AKA Firefox profile) folder using
    Help > Troubleshooting Information > "Show Folder" button
    Switch back to Firefox and Exit
    Pause while Firefox finishes its cleanup, then rename '''places.sqlite''' to something like places_20130614.sqlite. Keep this window open.
    Restart Firefox. By design, Firefox should import your last automatic bookmark backup.
    If you return to the Library dialog, how does it look?
    '''To reverse the test''' (but preserve a backup of your history/bookmark database):
    Exit Firefox
    Delete the newly created places.sqlite file
    Right-click copy and paste the places_20130614.sqlite and rename the copy to places.sqlite
    Restart Firefox and open the Library dialog. Should look like it did a few minutes ago before any changes.
    ''If the test showed no corruption,'' try to restore your last bookmarks backup. The procedure is described in this article: [[Restore bookmarks from backup or move them to another computer]].
    Does any of that get us closer to a solution?

  • Can simulatneous insert cause some problem in Oracle databse

    Two queries update A DB simultaneously.
    1st query adds 1000 rows to table A.
    2nd query adds 50 rows to table B.
    what can be the problem with such an update?
    how can this be rectified?

    Some confusion regarding your statements:
    Two queries update A DB simultaneously.Here you are indicating UPDATE operation on the database.
    1st query adds 1000 rows to table A.
    2nd query adds 50 rows to table B.Here you are indicating INSERT operation on the database.
    Unless there is a dependancy between table A and B (referentials, triggers), I donot see any problem with a scenario.
    If there is a dependency between table A and B (like A being parent of B or vice versa), depending on the time of record insertion, either of the transactions may fail with parent keys not found error.
    Can you post more details about the problem that you are facing?

  • RequestDispatcher.include causing some problem in Weblogic 9.1?

    I am migrating my application from web7.1. to 9.1.
              In some servlets, i am using the RequestDispatcher.include method to paste a relevant JSP content.
              When I access the servlets parameters values only after the requestDispatcherObject.include(req,res), the parameter values are returned as null.
              For eg.
              consider 2 parameter values , status,mode are present in a servlet, project.java.
              I am including project.jsp file inside this servlet.
              When I access the parameters only after the include statement, the values are returned as null, but when i access any one parameters before this statement, both the original parameter values are retained.
              i.e.
              /Project?status=disp&mode=true
              Inside <b>doGet</b> method of <b>Project .java</b>:
              <b>String mode=HttpServletRequest.getParameter("mode");
              RequestDispatcher reqdis=getServletConfig().getServletContext().getRequestDispatcher("/project.jsp");
              reqdis.include(req,res);
              String status=HttpServletRequest.getParameter("status");
              System.out.println("status "+status+"\nmode "+mode);</b>
              The above code prints the value
              <i>status</i> <b>disp</b>
              <i>mode</i> <b>true</b>
              However when we change the code as ,
              <b>RequestDispatcher reqdis=getServletConfig().getServletContext().getRequestDispatcher("/project.jsp");
              reqdis.include(req,res);
              String status=HttpServletRequest.getParameter("status");
              String mode=HttpServletRequest.getParameter("mode");
              System.out.println("status "+status+"\nmode "+mode);</b>
              the output is
              prints the value
              <i>status</i> <b>null</b>
              <i>mode</i> <b>null</b>
              Thsi problem occurs in weblogic 9.1, and is otherwise working fine in weblogic 7.
              Do I have to make code change in all instances where this problem occurs , or is there any common solution.
              Kindly help me solve this issue at the earliest

    I tried reproducing this, and I don't observe the same behavior. I get the same values (those specified in the URL) regardless of whether I retrieve them before or after the include (or mixed as in your example).
              There is only one way I can think this might happen. If you are using HTTP POST and using getInputStream() or getReader() to read the body of the request, you could affect things. This is mentioned in the servlet spec. This would fit with your behavior. If your servlet reads a parameter, WLS will parse the all the parameters and they stay read-only (you can't set parameters, only attributes). WLS will only parse on demand for performance reasons (no point if one isn't requested). Nothing the included page can do will affect the parameters, so you'd see both be set. If the servlet includes the JSP first and the JSP calls getInputStream() and reads all the data, then when the servlet gets a parameter and WLS attempts to parse the POST body, there is no data left to be read (because the JSP already read it). Thus, everything will be null.
              But, in your example, it appears you are using GET. It shouldn't be possible if the parameters are set as part of the URL. And indeed, I don't see it.
              Perhaps your example is a simplification? What is your include doing?

  • Inserting Blob in PL/SQL using select from other table

    Oracle 11.1.7.0:
    I am trying to insert blob column as defined below but not able to. Is this the right way of inserting blobs?
    set serveroutput on
    spool a.dat
    DECLARE
    BEGIN
      for i in 1..2
      loop
         for j in  (select r_payload                      
                       from fp_data where payload_id=331525112)
         loop
           EXECUTE IMMEDIATE 'insert into fp_data (r_payload) values ( ' || j.r_payload || ')';
        end loop;
      end loop;
      rollback;
    END;
    exit;

    BLOB work same a CLOB
    SQL> @clob
    SQL> drop table toto;
    SQL> create table toto (
      2    A  VARCHAR2 (30)  NOT NULL,
      3    B  VARCHAR2 (30)  NOT NULL,
      4    C  clob default empty_clob()
      5  )
      6        lob(c) store as toto_name_lo(disable storage in row)
      7  ;
    SQL>
    SQL> set feedback off
    SQL> set timing on;
    SQL> prompt
    SQL> prompt Insert lob with enabled storage in row:
    Insert lob with enabled storage in row:
    SQL> insert into toto (a, b, c)
      2  select owner a, object_name b, owner || ' ' || object_name c from all_objects
      3  where rownum < 10
      4  ;
    Elapsed: 00:00:00.51
    SQL> set timing off;
    SQL> select a,b from toto;
    A                      B
    SYS                      ICOL$
    SYS                      I_USER1
    SYS                      CON$
    SYS                      UNDO$
    SYS                      C_COBJ#
    SYS                      I_OBJ#
    SYS                      PROXY_ROLE_DATA$
    A                      B
    SYS                      I_IND1
    SYS                      I_CDEF2
    SQL> drop   table fp_data;
    SQL> create table fp_data (r_payload clob);
    SQL> insert into fp_data select c from toto where a = 'SYS'     AND B = 'I_IND1';
    SQL> select count(*) from fp_data;
      COUNT(*)
          1no need for PL/SQL

  • Latest update to autojump causes some problems

    After updating autojump today (1), zsh complains that "autojump.zsh" cannot be found, the "j" command seems to have disappeared from my system, and the "autojump" program no longer cd's into directories.
    I searched my disk for "autojump.zsh", but found that it had disappeared. So I'm sourcing "/usr/etc/profile.d/autojump.sh" in my .zshrc as an alternative. I also aliased "j" to "autojump". This makes the errors go away, but when I run "j <foo>", autojump merely prints out the name of the directory it should cd to instead of actually cd'ing there.
    Any tips :-)?
    (1) [2012-11-14 16:13] upgraded autojump (20-2 -> 21.0.3-1)

    I have same issue with bash.
    AFAIK autojump is enabled by sourcing /usr/etc/profile.d/autojump.sh - this script then tries to source:
    ~/.autojump/etc/profile.d/autojump.bash or /etc/profile.d/autojump.bash
    or if you use zsh:
    ~/.autojump/etc/profile.d/autojump.zsh or /etc/profile.d/autojump.zsh
    On my pc the .bash file autojump is looking for is in: /usr/etc/profile.d/autojump.bash
    So I think that either "/usr" should be added to paths in /usr/etc/profile.d/autojump.sh, or autojump's files should be moved from /usr/etc/profile.d/ to /etc/profile.d/.
    The second option seems much more likely for me, because only files I have in /usr/etc/ are autojump's files - it probably is a bug.
    edit: it's already reported: https://bugs.archlinux.org/task/32669
    Last edited by macioosch (2012-11-15 11:18:25)

  • HT4623 Downloading iOS 7.0.2 has caused some problems

    My partner downloaded and installed iOS 7.0.2 onto his iphone5, now if he double-clicks on the button to highlight all the apps running in the background, they do not have a subtract for him to close them, so he has limited battery life. Can you help please, I don't want to download it onto mine if I am going to have the same problem. Thankyou

    If you are able to, it might go faster by plugging into the computer for a major update like this one. it is too late now, but for next time

  • Issue with Selection Listener when the table has only one row

    Hi All ,
    I have developed a table in which I am using Selection Listener to perform some task when any row is selected.
    It is working fine when I have more than 1 row in the table, but when I have only one row in the table , the selection listener do not call the corresponding method in bean.
    I understand that selection event will be raised only when the row is changed, but in the use case when only one row is there, what should be done to make the selection listener work ?
    In the selection listener I have written code to make the selected row as current row , and perform the required task.
    Please suggest a way out for this situation.
    Thanks in advance.

    Hi,
    try removing this attr from table
    selectedRowKeys="#{bindings.xxx_VO1.collectionModel.selectedRow}"

  • Tree selection listener problem

    I have a JTree which uses a selection listener.
    I encounter a problem when I collapse a row while a leaf has focus.
    My program doesn't hang but so many error messages scroll up my prompt.
    How can I resolve this problem?
    Thanks!

    try to capture the error messages. If you are unable to get them from standard output, try redirecting to a file like:
    prompt>java samp > xwhere samp is your class file and x is the file your output is redirected to. After you collapse the leaf that has focus, close the application and open the file 'x'. Copy and paste the errors here.
    I'll see what I can do!

  • Best way of Using Index on a Table.

    I am trying to understand the phenomena of using INDEX on a Table
    need some guidance!!!
    Let us take this scenario
    I have a table "MYRECORD" which has 4 attributes(or coulombs)
    1. "STATE" (varchar) // this can have 49 different values like newyork, dehli etc
    2. "YEAR" //a year like 2007
    3. "MONTH" //a month like JAN,FEB etc
    4. "CAT" (int) // type(category) of data represented by values 0 to 40
    with a PRIMARY KEY(STATE,YEAR,MONTH,CAT)
    now i will create index
    1. INX_myrecord (STATE,YEAR,MONTH) on table MYRECORD
    so now my question is
    1. what is the effect on performance of DB it makes?
    2. when I use a query
    SELECT * FROM MYRECORD WHERE STATE="dehli" AND YEAR=2007 AND MONTH="JAN";
    how will it get processed if index is created and not created.
    3. how can I refer a index by name in a query if so possible?
    Cheers,
    UD
    Message was edited by:
    UDAY

    You have edited your post. Now you have a primary key consisting of state, year, month and cat which makes an index on state, year and month useless as the already existing primary key can provide for retrieval of rows by index. If you don't have other columns - or just few other not being large varchar2 columns - you should have created the table as an IOT (Index Organized Table - avoiding to have separate table and index containing - nearly - the same data) in the first place.
    As a primary key by definition can contain only unique non null values, a query like SELECT * FROM MYRECORD WHERE STATE='dehli' AND YEAR=2007 AND MONTH='JAN' cannot give you more than the number of distinct cat values (0 .. 40) + 1 (if cat can be null - presumed one/some of the corresponding state, year and month is not null)
    The information processing depends principally of the query, the mere presence of an index does not make sure it will be used. If an index is used it means the index will be searched first then the table rows will be accessed by rowids contained in the index (usually a single row or a range of rows - a rather small number of them - is retrieved this way, your select for example). Submitting something like SELECT * FROM MYRECORD WHERE YEAR=2007 AND cat=33 would most likely produce a full table scan of myrecord table ignoring the primary key.
    Regards
    Etbin

  • Apple TV remote causing macbook problems

    Hey so my girlfriend picked me up an Apple TV, this is amazing, BUT the stupid remote is what is causing some problems. Every time i use it for the apple TV, it affects my mac itunes as well. Ive gone into the security and disabled the inferred thing, but then that stops the syncing from the apple TV to my macbook pro.
    Question: Is there anyway i can totally block the remote from working with my macbook, while still allowing the Apple TV to sync, or is there a way to pair the Apple TV to my mac, not to iTunes, ive done that already.
    Thank you everything

    What you need to do is pair the laptop remote with the laptop.
    By pairing the Apple tv remote with the Apple tv you are ensuring that the Apple tv can only be used with the Apple tv remote, you are not ensuring that the Apple tv remote won't control other devices as well.
    laptop remote paired with the laptop = the laptop can only be controlled with the laptop remote.

Maybe you are looking for

  • Web Service input parms

    I have an XI web service I am utilizing via the Adaptive Web Service Model.  This service requires that I send some input parms.  I'm not quite sure how to get the parms into the request object.  I reviewed the tutorial and the bugger doesn't do that

  • Image quality in iMovie 11

    I'm working on a personal documentary with 16mm footage (it's been de-interlaced) , but because I have a non OpenCL iMac I'm relegated to using iMovie 11 for the time being for budget reasons.  I will also upconvert my 16mm film footage to HD so I ca

  • How to change login portlet message

    how to change the login message on the login portlet "Welcome to your Portal" to custom message ? thanks in advance

  • Intune: No licenses, user name not recognized and more errors

    I've just activated our IUR from our Action Pack subscription. So, I go an Intune product key for 5 users for 1 year and set it up in the Intune Portal. So far, so good. My domain and users from Office365 have automatically transferred to Intune as w

  • HT1351 is there any way I can find a serial number on a previously synced ipod?

    Is there any way to find a serial number on a previously synced ipod?