Helps the createRow() in a filtered Table

Hello, I have a page with top and Center jspx. At the top of my page, I have selectOneChoice with my master table primary keys.
At the Center, I have a detail table of adf.
By changing the value of selectonechoice, I use this selectonechoice value to filter the contents of my table adf with the following code:
    public void teste(ValueChangeEvent valueChangeEvent) {
        BindingContext ctx1 = BindingContext.getCurrent();
        
        DCDataControl dc =
            ctx1.findDataControl("AppModuleSGPUDataControl");
        
        ApplicationModule service = (ApplicationModule)dc.getDataProvider();
        
        ApplicationModule am =
            service.findApplicationModule("AppModuleSGPU");
  
        ViewObject vo = am.findViewObject("TTpNivelIcpEnViewUp1");
        
        vo.setWhereClause("TTpNivelIcpEn.CODIGO_TB_PARAMETRO = '" +
                           valueChangeEvent.getNewValue() + "'");
        vo.executeQuery();      
     }
So far so good, now I have also just below this table, a button to insert a line in this table with the following measures:
    public String cilNovoIcp_action() {
          BindingContext ctx1 = BindingContext.getCurrent();
          
          DCDataControl dc =
               ctx1.findDataControl("AppModuleSGPUDataControl");
          
          ApplicationModule service = (ApplicationModule)dc.getDataProvider();
          
          ApplicationModule am =
               service.findApplicationModule("AppModuleSGPU");
          
          ViewObject vo = am.findViewObject("TTpNivelIcpEnViewUp1");
          
          vo.createRow().setAttribute("CodigoTbParametro", "1");
     }
But this only works when there is no filter to the table, does anyone know how to create a line in the filtered tables?

My version of JDeveloper is 11.1.1.3.0.

Hello

VR;

BindingContext bctx = BindingContext.getCurrentInstance ();
BindingContainer links = bctx.getCurrentBindingEntry () (BindingContainer)
DCIteratorBinding dcIterator = (DCIteratorBinding) bindings.get("IteratorBindingName");
Line rw = dcIteratorBinding.getRowSetIterator () .createRow ();
rw.setNewRowState (Row.STATUS_INITIALIZED);
Insert a row of the iterator
dcIteratorBinding.getRowSetIterator () .insertRow (rw).
make new line current
dcIteratorBinding.setCurrentRowWithKey (rw.getKey () .toStringFormat (true));

Frank

Tags: Java

Similar Questions

  • I want to loop through the data from two different tables using for loop where the query should be replaced at runtime, please help me

    I have the data into two table with the structure of similar column, I want to loop through the data in these two tables

    based on some condition and runtime that I want to put the query in loop for example, the example is given, please help me

    create table ab (a number, b varchar2 (20));

    Insert into ab

    Select rownum, rownum. "" sample "

    of the double

    connect by level < = 10

    create table bc (a number, b varchar2 (20));

    Insert into BC.

    Select rownum + 1, rownum + 1 | "" sample "

    of the double

    connect by level < = 10

    declare

    l_statement varchar2 (2000);

    Boolean bool;

    Start

    bool: = true;

    If it is true, then

    l_statement: =' select * ab ';

    on the other

    l_statement: =' select * from bc';

    end if

    I'm in execute immediate l_statement - something like that, but I don't know

    loop

    dbms_output.put_line (i.a);

    end loop;

    end;

    Something like that, but this isn't a peace of the code work.

    Try this and adapt according to your needs:

    declare

    l_statement varchar2 (2000);

    c SYS_REFCURSOR;

    l_a number;

    l_b varchar2 (20);

    Boolean bool;

    Start

    bool: = true;

    If it is true, then

    l_statement: = "select a, b, AB;

    on the other

    l_statement: = "select a, b from bc;

    end if;

    --

    Open c for l_statement;

    --

    loop

    extract the c in l_a, l_b;

    When the output c % notfound;

    dbms_output.put_line (l_a |') -' || l_b);

    end loop;

    close c;

    end;

    /

  • Help to change the Code to display a table of 7 columns

    Hello

    Is that someone can help me to change the code I have a table of column 7 and as many line because it's results?

    Right now, all my results are in a table of column 1 and and 1 row.

    Thank you

    Roseline

    DECLARE
      vtemp  varchar2(4000) DEFAULT ' ';
     
    BEGIN
      htp.p('<HTML>');
      htp.p('<HEAD>');
      htp.p('<TITLE>DISQUES C</TITLE>');
      htp.p('</HEAD>');
      htp.p('<BODY>');
     
    FOR idx IN
        (
        SELECT DVD_ID, NomFichier,
               row_number() over(partition BY DVD_ID ORDER BY NomFichier  ASC) AS rna,
               row_number() over(partition BY DVD_ID ORDER BY NomFichier DESC) AS rnd
          FROM elements
         WHERE PROJET_ID = 1
      ORDER BY DVD_ID ASC, rna ASC
        )
          loop
          
            IF idx.rna = 1
            then
              htp.p('<TABLE>');
              htp.p('<TR>');
              htp.p('<TD>' || idx.DVD_ID ||' </TD> ');
              htp.p('</TR>');
              htp.p('<TR>');
            end IF;
     
            vtemp := vtemp || '<TD>' || idx.NomFichier || ' </TD>';
     
            IF mod(idx.rna, 7) = 0 OR idx.rnd = 1
            then
              htp.p(vtemp);
              vtemp := ' ';
            end IF;
     
            IF idx.rnd = 1
            then
              htp.p('</TR>');
              htp.p('</TABLE>');
            end IF;
          
          end loop;
     
    htp.p('</BODY>');
    htp.p('</HTML>');
     
    end;

    In fact I've complicated way there:

    DECLARE
        NOT_FIRST_DVD_ID BOOLEAN := FALSE;
        INCOMPLETE_ROW BOOLEAN;
        COLUMNS_PER_ROW NUMBER := 7;
    BEGIN
        htp.p('');
        htp.p('');
        htp.p('DISQUES C');
        htp.p('');
        htp.p('');
        FOR idx IN (
                    SELECT  DVD_ID,
                            NomFichier,
                            ROW_NUMBER() over(partition BY DVD_ID ORDER BY NomFichier  ASC) RNUM
                      FROM  elements
                      WHERE PROJET_ID = 1
                      ORDER BY DVD_ID,
                               RNUM
                   ) LOOP
          IF idx.RNUM = 1
            THEN
              IF NOT_FIRST_DVD_ID
                THEN
                  IF INCOMPLETE_ROW
                    THEN
                      htp.p('');
                  END IF;
                  htp.p('');
              END IF;
              NOT_FIRST_DVD_ID := TRUE;
              htp.p('');
              htp.p('');
              htp.p('');
              htp.p('');
          END IF;
          IF MOD(idx.RNUM,COLUMNS_PER_ROW) = 1
            THEN
              htp.p('');
              INCOMPLETE_ROW := TRUE;
          END IF;
          htp.p('');
          IF MOD(idx.RNUM,COLUMNS_PER_ROW) = 0
            THEN
              htp.p('');
              INCOMPLETE_ROW := FALSE;
          END IF;
        END LOOP;
        IF INCOMPLETE_ROW
          THEN
            htp.p('');
        END IF;
        htp.p('
    ' || idx.DVD_ID ||'
    ' || idx.NomFichier ||'
    '); htp.p(''); htp.p(''); END; /

    SY.

  • kindly tell how to use the unique value of a table with the index 0

    kindly tell how to use the unique value of a table with the index 0

    Hi
     
    Yep, use Index Array as Gerd says. Also, using the context help ( + h) and looking through the array palette will help you get an understanding of what each VI does.
     
    This is fundamental LabVIEW stuff, perhaps you'd be better spending some time going through the basics.
     
    -CC
  • Is there a way to calm the junk e-mail filtering. any screen printing in the body of the e-mail shots intospam

    Is there a way to calm the junk e-mail filtering.

    Silkscreen or any object in the photo in the body of the e-mail begins the email in spam, even if it comes from an authorized sender.

    "Discarded looked like spam or contain a virus."

    Hey mwbaumannmo!

    Unfortunately, no there is not a way to lower the settings of spam filter. My suggestion would be to try to send the image as an attachment and see if it will then print.

    I hope this helps!

  • Limits of size of the unit mailbox and filtering

    Is there a size max / recommended for a unified messaging environment? I heard that for a 100 MB size limit?

    The unit still filter through the Inbox for a new message or just when you have saved messages of all types such as e-mail, fax, vm?

    I don't know if a person removes a large number of emails, then the unit passes to the entire Inbox to see what is there are far as new, deleted, etc...

    Couple here things.

    First of all, in recent versions of 4.x, we rely on indexing services in Exchange to keep filters updated for the number of messages and generate the mailstack for voice, received faxes, emails that are presented to the appellant when connects. Unity doesn't build this index on the fly when you connect more unless for some reason, it isn't updated when we (meaning that it's a newly imported mailbox or the indexing service has not got to it yet or similar).

    When a Subscriber is imported in unity we insert requests to inbox of the mailbox on the Exchange service to maintain an index of messages based on the State of reading/type as that when we will connect we can get quickly a number of messages present and build a stack of messages to fairly short term. It is much, much faster to do it on the fly and helped the sites with very large inboxes to get acceptable performance. The indices, as soon as its created, are updated by Exchange whenever the Inbox changes (new message added, reading marked, deleted...). There may be a window of time from when a Subscriber is added and their index is up, however.

    So, assuming that you are on 4.1 or later and with the help of Exchange, I don't think there is any limit mailbox specific where the performance of UNIFIED messaging will start to decompose.

  • help the date in form format

    Please, I need help in the date format, I student_info table

    in this table, I A_Date (student action date) S_ text_item in this article I want to display the date but my requirement, it's that in this text_field the date not later than the date of the calendar

    for example the date that I enter is not superior to day today so superior to see the msg

    Add WHEN-VALIDATE-ITEM trigger on your date column and add under query and then compile and run the form and check.

    IF S_A_DATE > TRUNC (SYSDATE) THEN

    MESSAGE ('ADD YOUR MESSAGE HERE');

    MESSAGE ('ADD YOUR MESSAGE HERE');

    RAISE FORM_TRIGGER_FAILURE;

    END IF;

  • My requirement is, if we click on the POP UP LOV element so I want the dependent value of this item in column of the text element in a table.

    My requirement is

    If we click on the POP UP dot LOV button then I want the dependent value of this item in column of the text element in a table.

    How do I get this as a table?

    Hi Dan,.

    I have a table, in the first column is popup LOV.and second column key is text element.

    So my question is if we click contextual key lov and select employee name, then I want to show the email address of this employee in the second column of tabular presentation.

    This can be done with AJAX. Write a JavaScript function on the onchange event of popup LOV item (Employee) key and pass the number of the employee selected to your AJAX call, go get the employee email and assign it to your entry corresponding to the key LOV popup text has changed.

    As your dealing with Form (Wizard Based/APEX_ITEM Based-not specified) in a table, you take insofar as each column is the table of elements mapped to APEX_APPLICATION input. G_FXX tables and therefore to write JavaScript to locate the item to update.

    I hope this helps!

    Kind regards

    Kiran

  • Data control for the Web Service based filter table adf only appear not

    I have a SOAP web service I'm consumption as a web service data control.

    When I use one of the results of the web service through data to the web service in the form of a table control in the user interface with the filter and sort, I don't see the filters on the top of the table.

    It comes to JDeveloper version 11.1.1.7.

    Please let me know if anyone has an idea on this issue.

    TIA

    ABS

    You need connect your own logic on the filtering table.

    The table doesn't actually do the filter - it does, is the data control to filter the info - for a Web service we do not know how it will actually make a sort-, so you'll need to add a filterListener on the table and call a WS that will be returned the filtered data method.

  • Get the updated record the last based on the Date and the van of the user ID corresponding (multiple tables)

    Hello people,

    I currently have a working for this using PL/SQL solution, but it would be nice to have it using SQL. Any help is appreciated and once again, to your practice time.

    I'm looking to pick up the most recent date and the corresponding user that updated registration for a student in particular. There are two tables T1 and T2. The most recent date can be the create_date or modified_date of T1 or T2.

    Scripts for creating the table and INSERT statements:

    create table T1
      ( code           varchar2(4),
        create_date    date,
        create_userid  varchar2(20),
        modified_date  date,
        modify_userid  varchar2(20));
    
    create table T2
      ( code           varchar2(4),
        visit_id       number,
        visit_date     date,
        create_date    date,
        create_userid  varchar2(20),
        modified_date  date,
        modify_userid  varchar2(20));
    
    

    insert into T1 values ('1001',to_date('06-FEB-2013 09:12:12','DD-MON-YYYY HH24:Mi:SS'),'ROGER',to_date('12-APR-2013 13:01:12','DD-MON-YYYY HH24:Mi:SS'),'BRIAN');
    insert into T2 values ('1001',1,to_date('10-JAN-2013','DD-MON-YYYY'), to_date('10-JAN-2013 14:12:12','DD-MON-YYYY HH24:Mi:SS'),'ROGER',to_date('12-MAR-2013 12:01:06','DD-MON-YYYY HH24:Mi:SS'),'AMY');
    insert into T2 values ('1001',2,to_date('31-JAN-2013','DD-MON-YYYY'), to_date('12-MAY-2013 16:11:12','DD-MON-YYYY HH24:Mi:SS'),'GRACIE',null,null);
    
    insert into T1 values ('1002',to_date('12-JAN-2013 11:12:13','DD-MON-YYYY HH24:Mi:SS'),'LYNNELLE',to_date('12-APR-2013 13:01:12','DD-MON-YYYY HH24:Mi:SS'),'BRIAN');
    insert into T2 values ('1002',1,to_date('10-JAN-2012','DD-MON-YYYY'), to_date('10-JAN-2012 09:12:12','DD-MON-YYYY HH24:Mi:SS'),'ROGER',to_date('12-APR-2013 13:04:12','DD-MON-YYYY HH24:Mi:SS'),'AMY');
    insert into T2 values ('1002',2,to_date('10-JAN-2013','DD-MON-YYYY'), to_date('12-JAN-2013 11:12:13','DD-MON-YYYY HH24:Mi:SS'),'JOHN',null,null);
    
    insert into T1 values ('1003', to_date('04-FEB-2014 12:01:01', 'DD-MON-YYYY HH24:Mi:SS'), 'LYNNELLE', null, null);
    
    

    I want to show for the three codes are the following records:

    Code      Table Date                              User ID
    1001      T2  12-MAY-2013 16:11:12   GRACIE
    1002      T2 12-APR-2013 13:04:12   AMY
    1003 T1 04-FEB-2014 12:01:01 LYNNELLE
    
    

    1001 students, the most recent is the create_date of the visit count = 2 for the Code 1002, the most recent date comes from modified_date for visit 1 (its 3 seconds later than the T1 modified_date). Finally, for students 1003 (who did not all records in T2, the create_date is the only date and must be picked up.

    Thanks in advance.

    with t as)

    Select the code,

    NVL (MODIFIED_DATE, create_date) dt.

    case nvl (modified_date, create_date)

    When modified_date then modify_userid

    of other create_userid

    end userid,

    Tbl "T1".

    from t1

    Union of all the

    Select the code,

    NVL (MODIFIED_DATE, create_date) dt.

    case nvl (modified_date, create_date)

    When modified_date then modify_userid

    of other create_userid

    end userid,

    Tbl 'T2 '.

    the t2

    )

    Select the code,

    Max (TBL) keep (dense_rank last order by dt, tbl) tbl.

    Max (DT) dt,

    Max (UserID) keep (dense_rank last order by dt, tbl) userid

    t

    Code group

    order by code

    /

    CODE TO DT USERID
    ---- -- -------------------- --------------------
    1001 T2 MAY 12, 2013 16:11:12 GRACIE
    1002 T2 12 APRIL 2013 13:04:12 AMY
    1003 T1 4 FEBRUARY 2014 12:01:01 MANON

    SQL >

    SY.

  • Set the same width of all tables in a document

    Hello world. I have a document with a large number of tables (in a doc 2 columns) and wanting all the tables have width = 90.

    I found here a script witch (Dave_Saunders) , you can set the sith to a selected table, but I need to fix for all talbes document (about 700).

    Dave script relates to this post: tables: adapt the content to the framework

    Can someone help me automate this change in the width of the Tables.

    Mention that the first cell of the tables have the same content, the word "reference".

    Thanks in advance!

    Try this,

    if ((app.documents.length == 0) || (app.selection.length == 0)) { beep() }
    aDoc = app.activeDocument;
    tWidth = prompt("Table width", String("000"));
    for (s=0; s= 0; j--) {
              aTable.columns[j].width = aTable.columns[j].width * (tWidth)/w;
            }
        }
    }
    
    function findTable(obj) {
      if (obj.constructor.name == "Table") { return obj }
      while (obj.constructor.name != "Table") {
        obj = obj.parent;
        if (obj.constructor.name == "Application") {
          errorExit("Can't locate table");
        }
      }
      return obj;
    } 
    
    function errorExit(message) {
      if (arguments.length > 0) {
        if (app.version != 3) { beep() } // CS2 includes beep() function.
        alert(message);
      }
      exit(); // CS exits with a beep; CS2 exits silently.
    }
    
  • How do I get the separate elements of a table in a bean method?

    Hey everyone, how are you?

    I use Jdeveloper 12.1.2.0.0.

    I have a bean method that gets the items on a table-adf and I need the separate elements (of a given attribute) this table to highlight in the other table.

    For example: my table elements:

    ID name Tecnolgy

    1 oracle ADF

    2 oracle Jdeveloper

    3 Microsoft Visual Studio

    And I need the separate names in this table:

    Oracle; Microsoft

    So I highlighted them in another table.

    Normally I use an iterator and I will one by one and highlight what I want (as you can see, with a large table it can take a long time) and I wanted only to get the separate elements.

    My method of beans as something like this:

    DCIteratorBinding conIter = ADFUtils.findIterator ("VFactSalesNewView1Iterator");

    Line r [] = new Row [conIter.getAllRowsInRange () .length];

    r = conIter.getAllRowsInRange ();

    for (int i = 0; i < conIter.getAllRowsInRange () .length; i ++)

    {

    long productsInt = (Long) r [i] .getAttribute ("FkProduct");

    ...

    matchEmFactSalesProducts (r [i]);

    ..

    }

    I was wondering if it was possible to put a query and return the items in the request as lines (as I do with the iterator) or another possibility here.

    The request for my first table (the one in the example) is the following:

    SELECT VFactSalesNew.N_SALES,

    VFactSalesNew.QUANTITY,

    VFactSalesNew.ID_ANO,

    VFactSalesNew.QUARTER

    OF V_FACT_SALES_NEW VFactSalesNew

    WHERE

    ((nvl(:var_dimCoin,'0') = '0' OR FK_COIN IN (select * from THE (select cast (in_list(:var_dimCoin) as mytableType) double) a)))

    and the table I emphasize only has a select * from tableX;

    Any ideas?

    Kind regards

    Frederico.

    Hi Frederico,

    Hope you are well. Your VFactSalesNew table is filtered by any chance? Approach, you could do is to try to create a new VO with the following query:

    SELECT DISTINCT (yourTable.NAME)

    From yourTable

    But if your table is filtered, then I recommend you create a method in your implementation ViewObject that returns a LIST and there you iterate over the result set. In all cases, you will need to browse the whole list to get distinct values.

    Concerning

  • I can't get the page numbers in my table of contents to update when I update the book.


    I use Framemaker 11 and I have two tables of contents in my book: one in English and French. Each table of contents to links to various documents in the same book. The reference page for each table of contents is defined and properly displays the positions 1 and 2, I said that it appears, but numbers not updated when the contents of my document files change to another page. I checked the settings of conditional text in my document files; they are correct. When I update the book, I choose to update the numbers, all the cross-references, all text inserts, OLE links, generate a Table of contents, lists, and indexes. What I am doing wrong? Thank you.

    If they are not knocked down, then they are certainly not generated files. See the example in the help of FM11: http://help.adobe.com/en_US/FrameMaker/11.0/Using/images/bk_hier_books.png

    The 'K' is a TOC file that FM recognizes a generated file.

    Because you have created your table of the contents of the French with the help of another structure of the book, you could import reference this TOC file in another file of FM (for example to create an inset text) in the main book you want. However, you need to make updates in two steps. First update the French book to revise the table of contents. Then update the main book to get the rest of the correct pages (and given that the table of french contents are imported by reference, FM always uses the most recent version).

  • Dynamic action on the fields of forms in table form

    Hello guys.

    That I can see on the form fields in a table, I can't perform dynamic actions. What I want is to have an element of the selection list when in the change event, it changes the values for all the records in the report. For example if I have 40 records in this tabular form and I change the value of 'Open' to ' near the field called State, I want to see this change (status value of 'Open' close ') all rows in this tabular presentation. Is this sensible?

    Thank you very much, Bernardo.

    Hello Bernardo.

    There are several ways to accomplish what you want.

    -You can create a PL/SQL procedure to manage an update on all the rows according to the value of the value of your column. I wrote once a blog that can help you with that:

    http://vincentdeelen.blogspot.nl/2013/06/custom-multi-row-processing-using.html

    -You can create a dynamic action with javascript or jQuery to handle the change event.

    The first option is more secure because it is managed by the database, the second is more simple and example adjustable all the entire column for all rows displayed, without the need to refresh your tabular presentation, or your entire page. For course work, you should however have little validation at the end of the database. I also think that it is not possible to set the values of the rows that are not displayed, which would again require some PL/SQL for handling.

    If you need help setting up the dynamic action, please set up an example on apex.oracle.com.

    Kind regards

    Vincent

  • Load the XML data to the UNIX server directly to Tables of database relational

    Is there a way I can load some data from an XML file in the Oracle Tables, without going through the input file XML in a directory of the Oracle server. My XML file resides on the UNIX application server. And I need to load the data directly into database tables. Without load them into the database directory.


    Also, I'm looking for a solution that would not load my database much and affect other processes running. Can be done using SQL Loader?


    Oracle database version: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Thanks for the companions of answers!

    There I helped to learn a lot of options.

    But the easiest using UNIX server that worked for me was to use an XSLT transformation to convert the XML file to a delimited file. (Load the unix server, save the Oracle resources).

    UNIX 'xsltproc' feature was not a bad option.

    Then use SQL Loader to load into tables.

    Bravo!

    Rahul

Maybe you are looking for

  • Photon counting using Photon unique cash Module and PCI-6602

    Hi all I am currently working on program couting of photons using a single (Excelitas) and PCI-6602 photon counting module connected to the BNC-2121. I took a glance at other positions, but I still couldn't solve my problem (or, again, I'm not sure i

  • for HP CQ61Z-300 laptop repair tools

    Hello I'll try to find a tool tiny laptop repair value mentioned in the subject line (but of course would be used for other small bolts, screws etc. on any notebook computer).  Prefer a toolset that has been magnitized and had some sort of holding to

  • cannot get media player to work

    I got the media player and now I can not even find it

  • Ink per cent

    Y at - it anyway to know the PERCENTAGE of ink in a cartridge at a given time. Thank you for your help.

  • TVSU &amp; Windows Installer

    Hello! I ve you have a problem using the system update: -The updates downloaded, none has been installed so I tried to reinstall TVSU -I was not able to install it properly, during the progress of the installation, I got this message: "There is a pro