How do I prevent tree collapse after insert of row?

Hi,
I've got a tree with several discrattrbindings. It's a recursive tree representing a parent/child relation.
If I add a sub record to one of the children, the tree collapses. The insert is fine and the tree is ok, it's just that it completely collapses everytime I add something. How do I prevent this? This is extremely annoying for users.
(jdev9031 on win2k)
Greetings,
Ivo

I've got some additional info, which I think is a bug.
After the first record is added, the tree is collapsed, as I've said above. Now, if I reopen the tree and then try to open a node (that was previously closed) which has no subitems, then at the moment I click the '+', the entire tree collapses again. If I open a node that contains subs, it's fine, but empty nodes cause the tree to collapse.
This is only after insertion of a row. If I run the app without inserting a row, the tree remains open if I open an empty node.

Similar Messages

  • How to lock a table when i insert a row

    hi, friends,
    how to lock a table when i insert a row, then unlock the table

    If you want to lock the whole table so that no-one else can do DML then you go LOCK TABLE <table> IN EXCLUSIVE MODE. This lock remains in force until you commit or rollback.
    There are less powerful locking modes available, but you can look those up in the OTN online documentation.
    APC

  • Problem with a field set to refresh after insert at Row level

    hello all,
    i have a problem with a field (a serial) which is set by a db trigger at insertion. The field "refresh after insert" is properly set in the Entity and everything is refreshed correctly when i insert data via an adf form in a jspx but when i want to insert programmatically nothing is refreshed. I insert data this way :
    ViewObject insertVO = findViewObject("myView");
    Row newRow = insertVO.createRow();
    newRow.setAttribute("mandatoryAttribute1",value1);
    newRow.setAttribute("mandatoryAttribute2",value2);
    <more init here but not the serial since it will be set by the DB trigger>
    insertVO.insertRow(newRow);
    but when i want to get back the value with "newRow().getAttribute("TheSerial");" i always get a null back and not the value set by the db trigger.
    One way to get the serial is to commit after each insert but i don't want to commit between inserts.
    i've tried to unset the refresh after insert and override the createDef() method to setUseReturningClause(false) as it's is advised in chapter 26.5 of the ADF 4GL dev. guide but in this case i have an exception JBO-29000: JBO-26041.
    How can i get the value back properly ?
    thanks
    -regards

    The data for the newly created row doesn't get inserted into the database until the commit is executed, so the insert trigger isn't called.
    If you need to get the value without committing, then you should implement the trigger programmatically and drop the trigger from the database. The code below shows how you could do this.
    ViewObject insertVO = findViewObject("myView");
    Row newRow = insertVO.createRow();
    SequenceImpl seq = new SequenceImpl("MY_SEQ", insertVO.getDBTransaction());
    Long next = (Long)seq.getData();
    newRow.setAttribute("primaryAttribute", new Number(next));
    ...You will need to replace MY_SEQ and primaryAttribute with the correct values for your example, but this should acheive what you want.

  • Help me to return the primary key after insert the row

    Hi
    I am using JDBC, with oracle database. i have welformed normalization tables .i am inserting parent table with dynamic sequence number as primary key .after inserting i need inserted row primary key .how to get the inserted row primary key with out using select statement
    please help me
    Thanks in advance
    Edited by: 849614 on Apr 4, 2011 5:41 AM
    Edited by: 849614 on Apr 4, 2011 5:54 AM

    Hello
    If I undestand you, I think you should do this:
    Connection conexion = dataSource.getConnection();
    int idCenter=-1;
    String query = "Begin Insert into CENTER (NAME_CENTER) values (?) returning ID_CENTER into ?; end";
    callableStatement = conexion.prepareCall(query.toString());     
         callableStatement.setString(1, "Center name");               
         callableStatement.registerOutParameter(2, java.sql.Types.INTEGER);
              callableStatement.executeUpdate();
              idCenter=callableStatement.getInt(2);
    This way, you have in idCenter the primary key of the line that has just been inserted.
    Edited by: cris on 05-abr-2011 5:28

  • How to re-open tree nodes after a refresh to AdvancedDataGrid's GroupingCollection?

    Hello,
    I have an AdvancedDataGrid, which has as it's dataProvider a
    GroupingCollection. The GroupingCollection's source is bound to an
    ArrayCollection. Items in the ArrayCollection can be edited.
    After a change to the ArrayCollection, I refresh() the
    GroupingCollection so it displays properly. Unfortunately, this
    collapses the tree of the AdvancedDataGrid, that is, the previously
    open nodes are no longer open. I would like to re-open the nodes
    after a refresh.
    In the code provided, I have attempted to save the nodes
    which were open before the refresh, perform the refresh, then
    re-expand the nodes with AdvancedDataGrid.expandItem(). But it
    didn't work, and I am stumped.
    Any ideas on how to expand nodes in the AdvancedDataGrid?
    or
    Any ideas on how to allow the user to modify a data item,
    including fields used as GroupingFields, in an AdvancedDataGrid?

    Yes, I try saving the nodes like this:
    //save the currently opened items
    openArray = new Array();
    for each(var obj:Object in advancedDataGrid.openItems)
    openArray = openArray.concat(obj);
    and then restoring them with the expand function:
    //expands the nodes which are passed in as the argument
    private var expand:Function = function(array:Array):void
    for each(var obj:Object in array)
    advancedDataGrid.expandItem(obj, true);
    Unfortunately, expandItem just seems to return without doing
    anything!

  • How to refresh a table of data after inserting a row using ADF BC

    Hi,
    i am using ADF BC, JSF to construct a page to browse and another to create/update record. But after creating or updating the record it is not reflected when i come back to browse page.
    I tried to insert invokeaction in page definition page but i can not find the iterator bindings for that table in Binds option.
    can any one provide any example how to do it.
    Please help me.

    On the page def for your submit page, add inside the executables (on the structure pane) your iterator you want refreshed (if it isn't already there).
    Then double click on the submit button and bind it to a backing bean. My method in the backing bean looks like:
        if ( !operationBinding.getErrors().isEmpty() )
            return null;
        DCBindingContainer dcbindings = (DCBindingContainer)bindings;
        DCIteratorBinding appsIter = dcbindings.findIteratorBinding("ApplicationsIterator");
        appsIter.executeQuery();
        return null;
    }The executeQuery method will refresh that iterator for your return page. The "ApplicationsIterator" is what the structure pane calls your iterator. Works for me.
    Brian

  • How to get auto-increment value after insert on ACCESS db?

    When you insert a new record to a table with an auto-incrementing key, how do you find the value for the row you just inserted? This works differently with different databases. I know how it's done on ORACLE and mySql.
    How does it work with ACCESS through ODBC? How about MSSQL?

    I have discovered there's a LAST aggregate function which when I've tested it gets the just inserted auto-increment, but I'm not sure if it's reliable. You have to do:
    SELECT LAST(index-field) FROM table
    That ought to be faster than MAX, which I've noticed some people use. Persumable LAST will get the value from the last row in the table's natural order.
    In fact an auto-increment field has no business filling in missing slots since the main point is a a foreign key in other tables and a foreign key pointing to a deleted table row ought to be invalidated, not point to some unrelated successor record.
    I could use a separate table as a source of counters, of course, though that's one more call. In either case I'm worried about thread safety. In Oracle there are special sequence objects for this purpose which are incremented and read atomically. I'm not sure if the access driver transaction handling works adequately.
    Perhaps the safest approach might be to use a separate sequencer table and Java sychronisation to serialise access to each row in the sequencer table (assuming all the access is from the same app).

  • Refresh LOV after inserting data in correspondent table

    Hi all,
    I am using Jdeveloper 11.1.1.2 and ADFBC.
    I have a page with a table (tableA) with some fields. One of them has a LOV associated to another table(tableB). I have a button (button1) that shows a popup(popup1) and opens a new task flow with a fragment to insert data in the tableB.
    After inserting/modifying rows in tableB and after pressing commit (property: end-transaction) or rollback buttons (property: end-transaction and restore save point), LOV does not refresh.
    I have tried to set the property partial triggers of the LOV to button1 or popup1 and it does not work.
    How can I solve it?
    Thank you.
    Andrea

    How about VO for table B ? Did you refresh that ? I didn't use the same VO for table & LOV.
    so in "List data Source" -- VO -- I am using "SQL statement" and statement includes fields from Table B and Table A.
    VO for LDS using "Rows populated by a SQL query with read-only access". I didn't use "Updateable Access through Entity Objects".
    Sample of VO of LDS:
    select A.model_number modelNumber, a.part_number partNumber, b.MODEM_TYPE ModemType
    from table A a,Table B b
    where a.PART_NUMBER_ID = b.PART_NUMBER_ID
    and a.part_number_id =:partID
    Edited by: albertpi on Mar 16, 2010 7:26 AM

  • How to insert a row in database trough AappModule

    HI,
    I have used below code for getting details from databse. Now i have to insert a row in the database.
    Kindly let me know how can i use below code for inserting a row in the database. or should i make any change in its viewObject's Query.
    If there is any another way of inserting data in database through method binding please let me knoe that.
    ApplicationModule myService = ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
    ViewObject userInfoVO = myService.findViewObject("EmployeeViewParam1");
    userInfoVO.executeQuery();
    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EmployeeViewParam1Iterator");
    RowSetIterator rowIter1 = dcItteratorBindings.getRowSetIterator();
    Row[] rows1 = rowIter1.getAllRowsInRange();
    for(int i=0;i<rows1.length;i++)
    this.empId = (String)rows1.getAttribute("EmployeeId"); // primary key
    this.employeeName = (String)rows1[i].getAttribute("Employeename");
    Thanks and Regards,

    HI,
    i have tried belod code. for this i have made AppModuleImpl Class and wrote below method in that and called this method from my bean class with help of AppModuleImpl's Object.
    public void createEmployee (){
    ViewObjectImpl employee=getEmployeeView1();
    // ViewObject employee= findViewObject("EmployeeView");
    Row row = employee.createRow();
    row.setAttribute("Employeeid",189420);
    row.setAttribute("Employeename","Test");
    //Insert row in to the default row set
    employee.insertRow(row);
    but it is giving nullPointerException at line Row row = employee.createRow();
    Kindly help me to shortout this.

  • Fire trigger once when inserting 50 rows

    Is there a way to fire a trigger once after inserting several rows in a table within a single transaction.
    I dont want the overhead of firing the trigger for each row.

    Here is something dirty, but works!
    Works with regular inserts.
    SQL> select * from emp1;
    no rows selected
    SQL> create or replace package emp1_pkg as
      2  v_emp_inserts number := 0;
      3  end emp1_pkg;
      4  /
    Package created.
    SQL> create or replace trigger emp1_tgr
      2  before insert
      3  on emp1
      4  begin
      5       emp1_pkg.v_emp_inserts := emp1_pkg.v_emp_inserts + 1;
      6       if emp1_pkg.v_emp_inserts > 5 then
      7          dbms_output.put_line ('Trigger fired');
      8          emp1_pkg.v_emp_inserts := 0;
      9       end if;
    10  end;
    11  /
    Trigger created.
    SQL> set serveroutput on
    SQL> insert into emp1 values ('a', 1);
    1 row created.
    SQL> insert into emp1 values ('b', 2);
    1 row created.
    SQL> insert into emp1 values ('c', 3);
    1 row created.
    SQL> insert into emp1 values ('d', 4);
    1 row created.
    SQL> insert into emp1 values ('e', 5);
    1 row created.
    SQL> insert into emp1 values ('f', 6);
    Trigger fired
    1 row created.
    SQL> insert into emp1 values ('g', 7);
    1 row created.
    SQL> select * from emp1;
    ENAME            ENUM
    a                   1
    b                   2
    c                   3
    d                   4
    e                   5
    f                   6
    g                   7
    7 rows selected.

  • Inserting Multiple Rows

    Hi, I'm just evaluating Numbers and I can't figure out how to insert multiple rows within a set of existing rows. I can see how to add a single row above or below a row, but not how to open up a block to insert multiple rows.
    Many thanks, Jonathan

    Hi Mark,
    Thank you for the response. I hadn't looked at the "Table" menu, I was looking at the popup menu that appears at the front of the row - that menu continues just to offer 'add row'.
    It would be good if the help documentation included this information.
    Anyway, you tip solves the problem for me. Many thanks.

  • How-To "Refresh a table of data after inserting or deleting"

    I'd like to say a word on the how-to article "How to refresh a table of data after inserting or deleting a row using ADF".
    (http://www.oracle.com/technology/products/jdev/howtos/1013/updtable/index.html?_template=/ocom/technology/content/print)
    I spent a lot of time on it because I needed help in implementing simple CRUD functionality on a table, using JSF-ADF-TopLink technologies.
    While the the article does provide correct steps, it is in one important place not specific enough, so the reader may easily get stuck. In section "Refresh the data table", point 1: when you double click on the removeEntity() button, in Structure window, then you do not get the required dialog. You get CommandButton Properties dialog.
    You must click on the removeEntity() button in Editor's Design view. But even there you may get the CommandButton Properties dialog, not managed beans dialog.
    You may resolve that by going to JSF configuration file, faces-config.xml, and switch to Overview view. This will show you the managed beans that you have.
    Then, you may already have a backing bean for the page. You can use that and avoid creating a new managed bean.
    I could understand what the operations mean only after very careful reading of "Creating More Complex Pages", section "Overriding Declarative Methods" in JDeveloper Help (or in ADF Developer's Guide PDF document).
    In general: I believe that "ADF bindings" need more conceptual explanation, maybe in form of an article. Grammatical form "bindings" may create a false understanding that "bindings" are just references. But they are not -- ADF bindings are active objects that handle traffic between UI components and Data Controls. It seems that "bindings" even communicate among themselves. Maybe it would be more understandable to differentiate strictly between "binding objects" (or "binders"?), binding object definitions and binding object references.
    It would be very helpful to have a diagram showing grahically what specific binder objects are created in a small apllication (2-3 pages using 1-2 tables), with whom they communicate and what type of data is passed on.
    Priit

    Hi
    Thanks for your infos.
    Yes exactly I use almost the same code you have post here.
    Could You answer to my next questions?
    First - >what do you mean by saying that "it's not good idea using refreshing in IE?" Of course I use refreshing in backing_bean for my button "remove" that removes row, commit changes to database and refresh table, almost the same as You said in your post:
    Code in backing_bean is and comments on difference to Your code is below:
    public commandButton2_action1(){
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("removeEntity");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    //above remove entity, but I dont now if it do commit to database? So i do it below
    OperationBinding commit1 = bindings.getOperationBinding("Commit");
    commit1.execute();
    //and at the end I refresh my table, "findAllRezerwacja1 - it is an id of the methodAction, not the iterator -> is it ok? or should I change to Iterator id?
    OperationBinding requery = bindings.getOperationBinding("findAllRezerwacja1");
    requery.execute();
    return null;
    Page Definition code for this:
    <methodAction id="findAllRezerwacja1"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="findAllRezerwacja"
    RequiresUpdateModel="true" Action="999"
    ReturnName="SessionEJBLocal.methodResults.SessionEJBLocal_dataProvider_findAllRezerwacja_result"/>
    <table id="findAllRezerwacja2" IterBinding="findAllRezerwacja1Iter">
    <AttrNames>
    <Item Value="dataDo"/>
    <Item Value="dataOd"/>
    <Item Value="idRezerwacja"/>
    <Item Value="liczbaUczestnikow"/>
    <Item Value="prowadzacy"/>
    <Item Value="uwagi"/>
    </AttrNames>
    </table>
    <methodAction id="removeEntity" InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="removeEntity"
    RequiresUpdateModel="true" Action="999">
    <NamedData NDName="entity"
    NDValue="${bindings.findAllRezerwacja2.currentRow.dataProvider}"
    NDType="java.lang.Object"/>
    </methodAction>
    <action id="Commit" IterBinding="findAllRezerwacja1Iter"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" RequiresUpdateModel="true"
    Action="2"/>
    </bindings>
    //and rest of code for Iterator etc
    My second question is, why when you use refresh button in IE (I know is not recommended as You said, but sometimes user do it, so I want prevent situations that I will describe here) so when I press refresh button in IE exactly after removing one row by clicking my button, refreshing by pressing IE button is doing the same --> is deleting next row. How to stop deleting row, when for example user would press IE refresh button after pressing remove button for table. If I change selection in table after deleting row, and press refresh button in IE, instead of deleting row, I got error message: JBO-29000: JBO-35007: and
    JBO-35007. So where Im doing wrong. Maybe I should do sth with postback ? Could You help me? Thanks in advance
    Last one question: what is the difference between using delete and removeEntity from operations node? Im now reading carefully ADF Dev Guide, so I hope I can find infos there? But if You know, please answer to this question.
    Thanks

  • When inserting a checkbox, how can I prevent the note box from appearing?

    To all,
    After -reluctantly- "upgrading" from Acrobat Pro 7 to Pro X I find this new version absolutely maddening.
    Pro 7's features were easy to find in the tool bar. Now in Pro X everything is "dumbed down" with everything "nested" into each other...
    But I whine and digress from my problem:
    QUESTION:
    When inserting a checkbox, how can I prevent the note box from appearing?
    With every insertion of a checkbox onto a form, a "notebox" appears.
    Thank you,
    Matt

    As you can see, when I add a checkmark to a page/form, a "note" is automatically added also. In my old Acrobat v. 7, this did not happen.
    Any ideas on how I can set Acrobat Pro X to NOT include this note?
    Thank you,
    Matt

  • Regarding Mail:  When I return to my computer after it has gone to sleep, my accounts go offline, and are always asking me for the password.  THis is very annoying.  How can I prevent this?

    Regarding Mail:  When I return to my computer after it has gone to sleep, my accounts go offline, and are always asking me for the password.  THis is very annoying.  How can I prevent this?

    Back up all data.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Select the login keychain from the list on the left side of the Keychain Access window. If your default keychain has a different name, select that.
    If the lock icon in the top left corner of the window shows that the keychain is locked, click to unlock it. You'll be prompted for the keychain password, which is the same as your login password, unless you've changed it.
    Right-click or control-click the login entry in the list. From the menu that pops up, select Change Settings for Keychain "login". In the sheet that opens, uncheck both boxes, if not already unchecked.
    From the menu bar, select
    Keychain Access ▹ Preferences ▹ First Aid
    If the box marked Keep login keychain unlocked is not checked, check it.
    Select
    Keychain Access ▹ Keychain First Aid
    from the menu bar and repair the keychain. Quit Keychain Access.

  • I get "an error has occurred in the script on this page" it comes up for no reason on Firefox and I can't remove the message, it then goes away on it's own after 3 minutes? how do I prevent this message coming up? I have Windows 7.

    I get "an error has occurred in the script on this page" it comes up for no reason on Firefox and I can't remove the message, it then goes away on it's own after 3 minutes? how do I prevent this message coming up? I have Windows 7.
    I can work the screen behind the message which stays in the centre of my screen.

    Windows version is...?
    What pages are giving you problems? [post links to same]
    Are you getting the script errors only when attempting to print or...?
    Has your printer's manufacturer confirmed that your currently installed printer software is IE11-compatible (yet)?
    ~Robear Dyer (PA Bear) MS MVP-Windows Client since 2002 Disclaimer: MS MVPs neither represent nor work for Microsoft

Maybe you are looking for

  • My Address Book application is GONE - question mark on it on taskbar

    Hi. I'm a relatively new Mac user. My Address Book app is gone completely from my Applications folder and it has a question mark on it when I click on the icon in the taskbar. All of my contacts appear to be intact in Mail - they show up when I type

  • Ipod not ejecting properly

    Hey my nano 4th generation is not ejecting from windows XP and itunes properly. When i click on the eject button of itunes a message comes saying content of ipod is being used by some other application so cant eject and when i try to ejecy it by the

  • Shared Calendar and Permissions

    Hello, I have a shared calendar that we use in my organization and only 1 person has publishing editor rights while the rest of the company has reviewer rights. The problem is that if a reviewer opens a time block, instead of restricting the ability

  • Can I send a photo album rather tthan individual photos from my ipad

    I have just got my ipad. (Novice!!!!) Love it . However rather than just sending 2-3 photos I wouls like to on occassions send photo albums to friends and family. Can I do this?

  • Premiere Elements 9 was unusable -- working now

    Just installed Premiere Elements 9 trial on my Mac, OS X 10.5.8. It's unusable. The included sound clips are not even playable. If I double click on one, a wave form pop up, pressing play doesn't do anything. Any video clips I imported are not playab