How to refresh a table with multiple joins

Hi,
First at all, I'm newby in ADF, and my english is no so good, sorry for that...
I'm using JDeveloper 11g Release 2 (11.1.2.3.0). I have a table created from a view object that have multiple joins with other entities. When I insert a new row programmatically in one of the entities of the joins (not in the entitiy of the view object itself), the new row is created in the database correctly but the table don't show it. What can I do to refresh the table to see the new row created?
Thanks in advance!

You have to update the iterator the table is based on for the ui last. You do that by executing the query on the iterator again.
Timo

Similar Messages

  • How to create a table with multiple select on???

    Hi all,
            I am  new to webdynpro and my requirement is to create a  table with multiple selection on.I have to add abt 10 rows in the table but only 5 rows should be visible and moreover a verticalscroll should be available to view other rows.Can anybody explain me in detail how to do that.Please reply as if you are explaining  to a newcomer.Reply ASAP as i have to do it today.
                                                                           Thanxs

    Hi,
    1. Create a value node in your context name Table and set its cardinality to 0:n
    2. Create 2 value attributes within the Table node name value1 and value2
    3. Goto Outline view> Right click on TransparentUIContainer>Apply Template> Select Table>mark the node Table and it's attributes.
    you have created a table and binded its value to context
    Table UI properties
    4.Set Selection Mode to Multi
    5.Set Visible Row Count to 5
    6.ScrollableColCount to 5
    In your implemetaion, you can add values to table as follow:
    IPrivate<viewname>.ITableElement ele = wdContext.nodeTable().createTableElement();
    ele.setValue1(<value>);
    ele.setValue2(<value>);
    wdContext.nodeTable().addElement(ele);
    The above code will allow you to add elements to your table node.
    Regards,
    Murtuza

  • How to delete a row from a SQL Server CE Table with multiple JOINs?

    I want to delete a record from a SQL Server CE table.
    There are 3 tables scripts, options and results. I would like to remove a record from the results table. The where clause contains dynamic information which retrieved via other queries to different tables in the same database. These queries work fine and deliver
    the desired data.
    The Compact server is a clone of a remote table created using the sync framework. The same query to the remote table works fine.
    The error I get is:
    There was an error parsing the query. [ Token line number = 1,Token line offset = 10,Token in error = from ]
    The code that throws the exception is as follows:
    Dim connLoc As SqlCeConnection = New SqlCeConnection(My.Settings.ConnectionString)connLoc.Open()     Dim strDel As String = "Delete r from ResultsTable r inner join OptionsTable o ON o.TestName=r.TestName inner join ScriptTable c ON r.TestName=c.TestName WHERE r.TestName = '" & ds1Loc.Tables(0).Rows(0)(1) & "' AND [Index] = '" & lstIndex & "'"Dim cmdDel As SqlCeCommand = New SqlCeCommandcmdDel.CommandText = strDelcmdDel.Connection = connLoccmdDel.ExecuteNonQuery()
    The values held in ds1Loc.Tables(0).Rows(0)(1) and lstIndex are
    correct so should not be the problem.
    I also tried using parameterised queries
    Dim strDel As String = "Delete r from [ResultsTable] r inner join [OptionsTable] o ON o.TestName=r.TestName inner join [ScriptTable] c ON r.TestName=c.TestName WHERE r.TestName = @TestName AND [Index] = @lstIndex"
    Dim cmdDel As SqlCeCommand = New SqlCeCommand        cmdDel.CommandText = strDel       
    With cmdDel.Parameters           
    .Add(New SqlCeParameter("@TestName", ds1Loc.Tables(0).Rows(0)(1)))           
    .Add(New SqlCeParameter("@lstIndex", lstIndex))       
    End With 
    cmdDel.Connection = connLoc        cmdDel.ExecuteNonQuery()
    I have tried replacing the "=" with "IN" in the the WHERE clause but this has not worked.
    Is it the join that is causing the problem? I can do a select with the same search criteria and joins from the same database.
    Also this query works with SQL Server. Is it perhaps that SQL CE does not support the Delete function the same as SQL Server 2008? I have been looking at this for a while now and cannot find the source of the error. Any help would be greatly appreciated.

    Hello,
    In SQL Server Compact, we can use join in FROM clause. The DELETE statement fail may be caused by the FOREIGN KEY constraint.
    Please refer to:
    DELETE (SQL Server Compact)
    FROM Clause (SQL Server Compact)
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • TO DRAW A TABLE WITH MULTIPLE ROWS AND MULTIPLE COLOUMNS IN FORM

    Hi,
       How to draw a table with multiple rows and columns seperated by lines in form printing?

    check this
    http://sap-img.com/ts003.htm
    Regards
    Prabhu

  • How do I refresh a table with a bind variable using a return listener?

    JDev 11.1.2.1.0.
    I am trying to refresh a table with a bind variable after a record is added.
    The main page has a button which, on click, calls a task flow as an inline document. This popup task flow allows the user to insert a record. It has its own transaction and does not share data controls.
    Upon task flow return, the calling button's return dialog listener is invoked which should allow the user to see the newly created item in the table. The returnListener code:
        // retrieve the bind variable and clear it of any values used to filter the table results
        BindingContainer bindings = ADFUtils.getBindings();
        AttributeBinding attr = (AttributeBinding)bindings.getControlBinding("pBpKey");
        attr.setInputValue("");
        // execute the table so it returns all rows
        OperationBinding operationBinding = bindings.getOperationBinding("ExecuteWithParams");
        operationBinding.execute();
        // set the table's iterator to the newly created row
        DCIteratorBinding iter = (DCIteratorBinding) bindings.get("AllCustomersIterator");
        Object customerId = AdfFacesContext.getCurrentInstance().getPageFlowScope().get("newCustomerId");
        iter.setCurrentRowWithKeyValue((String)customerId);
        // refresh the page
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.getFilterText());
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.getCustomerTable());But the table does not refresh ... The bind variable's inputText component is empty. The table flickers as if it updates. But no new values are displayed, just the ones that were previously filtered or shown.
    I can do the EXACT SAME code in a button's actionListener that I click manually and the table will refresh fine. I'm really confused and have spent almost all day on this problem.
    Will

    Both options invoke the create new record task flow. The first method runs the "reset" code shown above through the calling button's returnListener once the task flow is complete. The second method is simply a button which, after the new record is added and the task flow returns, runs the "reset" code by my clicking it manually.
    I'm thinking that the returnListener code runs before some kind of automatic ppr happens on the table. I think this because the table contents flicker to show all customers (like I intend) but then goes back to displaying the restricted contents a split second later.
    Yes, the table is in the page that invokes the taskflow.
    Here are some pictures:
    http://williverstravels.com/JDev/Forums/Threads/2337410/Step1.jpg
    http://williverstravels.com/JDev/Forums/Threads/2337410/Step2.jpg
    http://williverstravels.com/JDev/Forums/Threads/2337410/Step3.jpg
    Step1 - invoke new record task flow
    Step2 - enter data and click Finish
    Step3 - bind parameter / table filter cleared. Table flickers with all values. Table reverts to previously filterd values.

  • 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

  • I need your expert opinion on how to create a map with multiple conditions.

    Hello.
    I need your expert opinion on how to create a map with multiple conditions.
    I have a procedure (which i cannot import or re-create in OWB due to the bug), so i am trying to create a map instead :-(
    How can i create a cursors within the map?
    My function creates table and cursor.
    Then it will have to check for duplicates in the tables (the one created and another table) - the criteria for finding duplicates is a number of fields.I then need to place few different conditions (if some attributes are not available) and it has to load cursor based on this conditions. The next step is to fetch the data into the cursor based on what attributes are missing.
    The next thing it will do is insert the data into table (if record doesn't exist), output the error in separate table is record is corrupted, or update the record with changed information.
    In short i need to re-create match / merge but with conditions, iterations etc 'built into' it.
    I can read up on available functions - it's just what would be the best options? and what would be the best approach to do so?
    In my function i use %rowtype - but cannot use it in owb - so what would be the alternative? i don't really want to create a lot of variables and then have a nightmare of maintaing it. are there any tips regarding this?
    having looked through Oracle dedupe - it's not really what i need because it is just DISTINCT.
    I would appreciate any help / advise on this.
    Thank you very much

    thanks a lot for your reply - i will look into this option :-)
    it is a bit more complicated now as i have to re-create the match / merge and then somehow 'tweak' it to achieve the result i need.
    At the moment i am looking to breakdown the package into smaller chunks 'functions' and try creating the map that way.
    Anyway, thank you very much for your suggestion.

  • Performance Issue with Multiple Joins :-)

    Hi there! I have a dilemma over using multiple joins...and I am not sure whether there is any alternative to this. Please help me out if you can..
    I have a table DATA having 100 columns and 2 million records and I have another metadata table Code_Mappings. The issue is with migration of this data from upstreams to downstreams.
    Columns of DATA table is
    a,b,c,d,e,f,g,h.......ca.cb.cc.cd.....dz.
    Code_Mappings table is
    Source_code |Target code | category
    The problem arises when I join the metadata table for multiple joins..
    Around 75 columns out of 100 are category questions i.e I need to replace all Source codes in the data of those category columns with target codes WRT categories..
    Suppose A, C,D,I,J,K,L,W,X,Z,AA,BH are country category.
    My query to fetch data from DATA for column A would be
    Select decode(d.A, cm.source_code,cm.target_code,d.A) from DATA D,Code_Mappings CM where cm.category like 'country' and d.A=cm.source_code;
    In the similar way, I may have to join the same table for category 'country' for n no of columns if those columns have category as 'country'.
    Is there a alternative to use this table once and use the decode, mapping logic multiple times on columns..? Please let me know if there is anyways I can do it so that performance is enhanced in a significant manner.
    Another Issue is:
    Whenever the Column value is some junk, that record doesnt get fetched. In the above query, you can see that where clause has a condition of "d.A=cm.source_code" which not only filters out these required records but also avoids cartesian product.
    The basic requirement is all records should get fetched. I do not want to filter out anything.
    Please help me out.
    Thanks
    Mahesh

    1) I'm not a JD Edwards person, but I would wager that if you're to the point where you have consolidated all the schemas to a single instance that it would be possible and preferrable to consolidate everything further into a single schema. I have to believe that JD Edwards provides tools to restrict what bits a particular branch can see without requiring separate instances.
    2) What data are you accessing exactly? Are you always accessing data for a particular branch? Or do you need information from every branch?
    3) Is your application logging in as a single user? Or will there be 1 application user for every JD Edwards schema?
    4) Are you deploying your PL/SQL into 10-20 different schemas? Or into just 1?
    Whether or not you are explicitly using the schema name, Oracle will have to do a hard parse of every logically distinct SQL statement. Two SQL statements that access different tables that happen to share the same name are logically distinct, so your shared pool will end up with 10-20 copies of the "SELECT * FROM <<some table name>>" SQL statement if it is executed against every instance of <<some table name>>.
    The question may be whether it is better to explicitly provide the schema name or to rely on synonyms. You generate the same number of hard parses either way, but explicit schema names may improve latch contention during parses if Oracle has to do a lot of synonym resolution. Not many people/ applications are really hurt by this latch contention, though, so it is very hard to say whether this is a legitimate concern.
    Justin

  • Select max date from a table with multiple records

    I need help writing an SQL to select max date from a table with multiple records.
    Here's the scenario. There are multiple SA_IDs repeated with various EFFDT (dates). I want to retrieve the most recent effective date so that the SA_ID is unique. Looks simple, but I can't figure this out. Please help.
    SA_ID CHAR_TYPE_CD EFFDT CHAR_VAL
    0000651005 BASE 15-AUG-07 YES
    0000651005 BASE 13-NOV-09 NO
    0010973671 BASE 20-MAR-08 YES
    0010973671 BASE 18-JUN-10 NO

    Hi,
    Welcome to the forum!
    Whenever you have a question, post a little sample data in a form that people can use to re-create the problem and test their ideas.
    For example:
    CREATE TABLE     table_x
    (     sa_id          NUMBER (10)
    ,     char_type     VARCHAR2 (10)
    ,     effdt          DATE
    ,     char_val     VARCHAR2 (10)
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0000651005, 'BASE',    TO_DATE ('15-AUG-2007', 'DD-MON-YYYY'), 'YES');
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0000651005, 'BASE',    TO_DATE ('13-NOV-2009', 'DD-MON-YYYY'), 'NO');
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0010973671, 'BASE',    TO_DATE ('20-MAR-2008', 'DD-MON-YYYY'), 'YES');
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0010973671, 'BASE',    TO_DATE ('18-JUN-2010', 'DD-MON-YYYY'), 'NO');
    COMMIT;Also, post the results that you want from that data. I'm not certain, but I think you want these results:
    `    SA_ID LAST_EFFD
        651005 13-NOV-09
      10973671 18-JUN-10That is, the latest effdt for each distinct sa_id.
    Here's how to get those results:
    SELECT    sa_id
    ,         MAX (effdt)    AS last_effdt
    FROM      table_x
    GROUP BY  sa_id
    ;

  • How to create a table with events in smartforms?

    How to create a table with events view in smartforms?
    It doesn't like general table with header, main area and footer.
    for example:
    in smartforms: LE_SHP_DELNOTE
    table name is TABLEITEM(Delivery items table)

    Vel wrote:
    I am creating XML file using DBMS_XMLGEN package. This XML file will contain data from two different database tables. So I am creating temporary table in the PL/SQL procedure to have the data from these different tables in a single temporary table.
    Please find the below Dynamic SQL statements that i'm using for create the temp table and inserting the data into it.
    Before insert the V_NAME filed, i will be appending a VARCHAR field to the original data.
    EXECUTE IMMEDIATE 'CREATE TABLE TEMP_TABLE (UNIQUE_KEY NUMBER , FILE_NAME VARCHAR2(1000), LAST_DATE DATE)';
    EXECUTE IMMEDIATE 'INSERT INTO TEMP_TABLE values (SEQUENCE.nextval,:1,:2)' USING V_NAME,vLastDate;What exactly i need is to eliminate the INSERT portion of it,Since i have to insert more 90,000 rows into it. Is there way to have the temp table created with data in it along with the sequence value as well.
    I'm using Oracle 10.2.0.4 version.
    Edited by: 903948 on Dec 22, 2011 10:58 PMWhat you need to do to eliminate the INSERT statement is to -- as already suggested by others - eliminate the temporary table. You don't need it. It is just necessary overhead. Please explain why you (apparently) believe that the suggestion of a view will not meet your requirements.

  • How do I share iTunes with multiple users on Mac mini?

    How do I share iTunes with multiple users on Mac mini?

    You have to turn on Sharing and then Authenticate Sharing on the other devices. You can have up to 5.

  • How to create a table with varied number of columns?

    I am trying to create a balance table. The colunms should include years between the start year and end year the user will input at run time. The rows will be the customers with outstanding balance in those years.
    If the user input years 2000 and 2002, the table should have columns 2000, 2001, 2002. But if the user input 2000 and 2001, the table will only have columns 2000 and 2001.
    Can I do it? How? Thanka a lot.

    Why did you create a new thread for this?
    How to create a table with varied number of columns?

  • How to create a table with datatype blob and insert a pdf file (ravi)

    how to create a table with datatype blob and insert a pdf file,
    give me the explain asap
    1.create the table?
    2.insert the pdffiles into tables?
    3.how to view the files?
    Thanks & Regards
    ravikumar.k
    Edited by: 895044 on Dec 5, 2011 2:55 AM

    895044 wrote:
    how to create a table with datatype blob and insert a pdf file,
    give me the explain asapPerhaps you should read...
    {message:id=9360002}
    especially point 2.
    We're not just sitting here waiting to answer your question as quickly as possible for you.

  • How to build a table with predifined? Like Huffman decoding, there are 34 predefined tables?

    I am trying to use Labview for mp3 huffman decoding. there are 34 predefined tables for lookup purpose. I tried build array control, but it is so hard to assign value with size of 16. What is the better way to create predefined array? And how to do lookup table with Labview?

    IMHO, the best way to have something "predefined" is to read this data from a "setup/configuration" file (if you don't want to use "default settings" LV feature). The choice of the format for all the data that you want to store in some kind of configuration file is up to you.
    Also, constructing a "lookup table" in LV doesn't seems different as for any other programming language.

  • How to design a form with multiple lang(Arabic and Eng) in a page

    Hi All,
    Could you pls help me how to design a form with multiple languages. when I set the form proprties-->Form Locale as Arabic. English text is comming in reverse and when set the FormLocale as English, Arabic text is comming in revese.
    Pls help me how to design
    Thanks in advance.
    Regards,
    Jayakar

    I am not sure how you can have two different languages inside the same PDF.
    Alternatively, if you want to place only the static labels, you can convert all the static label in one language to images and set the form language setting to other. And place the images inside the form using Image field. For example, you can keep the form language as English and then convert all the arabic language labels/ Static text to images.
    Anotherway,
         Have same sections in both the languages and hide and unhide based on the user selection of the language..
         if your user chooses Arabic, then you can unhide the Arabic sections and change the form language properties programmatically..
    Thanks
    Srini

Maybe you are looking for

  • Umlauts not displayed correctly

    Hi, We have developed a screen in 12.1 and the umlauts (German & Spanish) are not display correctly. Is there a language pack / custom actions we need deploy for this to work properly? Regards, Chanti.

  • HP ScanJet 6200c with 10.4.11 - without VueScan

    I have a perfectly good ScanJet 6200c that I would like to use with my (new to me) g4 10.4.11. I checked out VueScan which is nice, but does anyone know if there anything out there that is free? Seems a shame to have to buy a new scanner since this o

  • Material Availablity check for production order - function module?

    I have a production order with Material BOM, which has more than 30 components in it. Please suggest me if there is any function module to do the material availability check of a production order. I need the missing component list as output of that f

  • Exiting programs using the escape key

    My team and I are design games for autistic children. One of the problems we are having is that we do not know how to quit the application using the escape key. Our team would really appreciate it if you could tell us how this is done.

  • How to Find references to a method or a constant?

    I want to programmatically find the references to a method or a constant defined in a class. For example, in Eclipse you can right click on a class, select 'References', and you can get a list of all the places throughout your code that references th