Table linked to an ArrayList, get data repeatedly

11.1.2.2 JDev

I have a page with three showDetailHeaders.

The first showDetailHeader, that is disclosed during of the loading of the page, has a pie chart that is linked to a ViewObject.  It makes it very well.

The second showDetailHeader, which is not disclosed during the loading of the page, has a richeTableau that is bound to an ArrayList < CustomEO > that is generated in a managed Bean.  When I divulge the second showDetailHeader, the bean method that generates the data in the table is called several times (15 times).  Once the table load, when I scroll beyond the "rangeSize", it hits again repeatedly bean method to get the next batch in the range.

Any ideas what might be causing the loop?

Here is the code for the table and surrounding showDetailHeader:

<af:showDetailHeader text="Out Of Compliance Training Items" disclosed="false" id="sdh1"
                                 type="default">
                  <f:facet name="context"/>
                  <f:facet name="menuBar"/>
                  <f:facet name="toolbar"/>
                  <f:facet name="legend"/>
                  <f:facet name="info"/>
                  <af:table value="#{MytrainingStatusSummaryBean.outOfComplianceItemsData}" var="row"
                            rowBandingInterval="0" id="t1" styleClass="AFStretchWidth" fetchSize="25">
                        <af:column sortable="false" headerText="Username" align="start" id="c1" width="125">
                              <af:outputText value="#{row.username}" id="ot1"/>
                        </af:column>
                        <af:column sortable="false" headerText="First Name" align="start" id="c2" width="150">
                              <af:outputText value="#{row.firstName}" id="ot2"/>
                        </af:column>
                        <af:column sortable="false" headerText="Last Name" align="start" id="c3" width="150">
                              <af:outputText value="#{row.lastName}" id="ot3"/>
                        </af:column>
                        <af:column sortable="false" headerText="Item Title" align="start" id="c4" width="250">
                              <af:outputText value="#{row.itemTitle}" id="ot4"/>
                        </af:column>
                        <af:column sortable="false" headerText="Due Dt" align="start" id="c5" width="150">
                              <af:outputText value="#{row.dueDt}" id="ot5"/>
                        </af:column>
                  </af:table>
            </af:showDetailHeader>

Here is the code for the method that generates the ArrayList < CustomEO > that the table is related to:

public List getOutOfComplianceItemsData() {
        logger.info("Getting OutOfComplianceItemsData");
        List<CustomEO> outOfComplianceItemsData = new ArrayList<CustomEO>();
        BindingContainer bindings = ADFUtils.getBindingContainer();
        DCIteratorBinding iter = (DCIteratorBinding) bindings.get(ITERATOR_NAME);
        MytrainMatrixVOImpl vo = (MytrainMatrixVOImpl) iter.getViewObject();
        vo.setbind_SiteId(SessionUtils.getSelectedSiteId());
        vo.executeQuery();
       
        RowSet rs = vo.getRowSet();
        while(rs.hasNext()){
            logger.finer("Checking Row.");           
            MytrainMatrixVORowImpl row = (MytrainMatrixVORowImpl) rs.next();
            Long daysUntilExpiration = row.getDaysUntilExpiration();
           
            if(daysUntilExpiration < 0L && daysUntilExpiration != -9999999L){
                logger.finer("Adding MytrainOutOfComplianceItemsCustomEO to list || ITEM_ID: " + row.getItemId() + " || USER_ID: " + row.getUserId());
                MytrainOutOfComplianceItemsCustomEO newEo = new MytrainOutOfComplianceItemsCustomEO();
                newEo.setUsername(row.getUsername());
                newEo.setFirstName(row.getFname());
                newEo.setLastName(row.getLname());
                newEo.setItemTitle(row.getTitle());
                newEo.setDueDt(row.getDueDt());
                outOfComplianceItemsData.add(newEo);
            }
        }
        logger.info("Returning OutOfComplianceItemsData");
        return outOfComplianceItemsData;
    }

Getters in JSF/ADF are called several times during the life cycle request, is not a good idea to have operations 'expensive' in them.

Try to fill the list in another place and getter keep only:

public list getOutOfComplianceItemsData() {}

Return outOfComplianceItemsData;

}

Dario

Tags: Java

Similar Questions

  • Get data from transient attribute to another VO

    Hello

    I created a transitional attribute in a table, how do I get the data in the other table.

    My requirement is

    I have two tables are ministries and officials, Dept_effect_date is a field in the departments, I need this field with data in the original Version used. I created the transitional VO employees with the same name attribute, but can't hw I get data data same Department for emp?

    Sainaba

    You can get the value of the current row in the main table and place it in the secondary table.

    Line curRow = masterVo.getCurrentRow ();

    or if you have a relationship master detail then go into your viewLink and see the name of the accessor here and write your expression like this

    accesorName.attributeName

    to refer to see - ADF tutorial: transient attributes and how to complete the & #8211; Part 1 | Oralublog - Oralution & #039; s Blog

  • Table is not fetch all the data of the VO at a time?

    Hello world

    My version of Jdev is 11.1.2.3.0.
    I developed page ADF that has a single Table that should show all the data in the original Version at the same time.
    The table has vertical and horizontal scroll bars. And the VO has more than 900 documents.
    The question is, at the start when loading the page table shows 20-25 records then when I try to scroll down and then the data is going to look this day there ("retrieving data" message) by which its takes a long time to see the data because its extraction at the time where I scroll down.
    How can I avoid this?
    How will I be able to retrieve all data from VO (all 900 records) by which when I scroll data should not look at this time?

    And also increases the size of the table and is based on the data when I scroll down.
    How can I avoid this?
    How can we fix the size of the table regardless of the content?

    All suggestions will be really useful...


    Thank you.

    The message «Retrieving data...» "is issued by the client component of table rich user interface when it retrieves data of the server-side model component lines in its local buffer of lines. Even if the server-side model component has recovered all the rows from the database (e.g. VO has recovered all of the rows from the database in the cache of the VO), the client component of table UI does not download all of them locally, but it downloads as needed into portions whose size is controlled by the attribute 'fetchSize' of the table. By default, the 'fetchSize' attribute is set to the value of the property "rangeSize' of the corresponding mandatory ADF iterator (whose default value is 25). In this way, if you scroll to the bottom of the table of the UI after the 25th row, the table would download the next set of 25 lines of its components side server model (and it then displays the message "retrieving data... ('') and so on.

    If you want to avoid downloading frequent of the next rowset of the component side server model to the customer table component user interface, you can set attribute 'fetchSize' of the table to a more fixed, for example:

    
    

    In this way, only the client user interface table would download locally 1000 lines (if there are so many existing lines, of course) and it won't download more rows until you scroll the table after the 1000th line (when it would download a next series of 1000 lines).

    Be wise when the setting 'fetchSize' of the table to a large number, because more the 'fetchSize', greater would be the size of HTTP, the longer answer response would be and more memory at the customer level would be consumed for the customer table buffer. Note that-1 (for example "get all") is not a valid value for the attribute 'fetchSize '. If you set it to-1, it will default to 25.

    Dimitar

  • PL Sql block logic to get dates in CSA

    Hi all

    We have

    TABLE: HEAD (CONTRACT VARCHAR2 (200), STARTDATE DATE, POSTED DATE)

    DATA:
    ('A',TO_DATE('01-01-12','dd-mm-yy'),TO_DATE('31-12-12','dd-mm-yy'));
    ('B',TO_DATE('01-02-12','dd-mm-yy'),TO_DATE('31-12-12','dd-mm-yy'));
    ('C',TO_DATE('01-03-12','dd-mm-yy'),TO_DATE('31-12-12','dd-mm-yy'));
    ('D',TO_DATE('01-02-12','dd-mm-yy'),TO_DATE('31-12-12','dd-mm-yy'));

    QUERY:

    DECLARE

    ln_level NUMBER;
    BEGIN
    LN_LEVEL: = 3;
    FOR H IN (SELECT DISTINCT STARTDATE LD_CSDATE, HAD LD_EXPDATE OF)
    HEAD)
    LOOP
    I'm IN
    (WITH DATES AS)
    (SELECT TO_DATE (H.LD_CSDATE, ' DD-MM-YYYY "") STARTDATE,)
    TO_DATE (H.ld_expdate + 1, ' DD-MM-YYYY "") enddate
    OF the double
    )
    SELECT TO_CHAR (add_months (startdate, LEVEL * LN_LEVEL-LN_LEVEL), 'DD-MM-YY') sd,.
    TO_DATE (add_months (TO_CHAR (add_months (startdate, LEVEL * LN_LEVEL-LN_LEVEL), ' DD-MON-YY'),LN_LEVEL),'DD-MM-YY')-1 endd)))
    OF dates
    CONNECTION OF LEVEL < = months_between(enddate, startdate)/LN_LEVEL
    )
    LOOP

    FOR J IN (SELECT AGREEMENT OF THE HEAD WHERE STARTDATE = TO_DATE(H.LD_CSDATE,'DD-MM-YY')
    (STARTDATE BETWEEN TO_DATE(I.SD,'DD-MM-YY') AND TO_DATE(I.ENDD,'DD-MM-YY')
    STARTDATE OR < TO_DATE(I.SD,'DD-MM-YY'))
    )
    LOOP
    DBMS_OUTPUT. PUT_LINE (I. SD | » -'|| I.ENDD: '-' | J.CONTRACT);
    END LOOP;
    END LOOP;
    DBMS_OUTPUT. Put_line (Chr (10));
    END LOOP;
    END;



    OUTPUT:
    01-01-12-31-MAR-12-A
    01-04-12-30-JUN-12-A
    01-07-12-30-SEP-12-A
    01-10-12-31-DEC-12-A

    01-02-12-30-APR-12-B
    01-02-12-30-APR-12-D
    01-05-12-31-JUL-12-B
    01-05-12-31-JUL-12-D
    01-08-12-31-OCT-12-B
    01-08-12-31-OCT-12-D

    01-03-12-31-MAY-12-C
    01-06-12-31-AUG-12-C
    01-09-12-30-NOV-12-C

    Can you please change my query to get the Sub result, as I am not able to understand where to start to get the desired result.

    OUPTUT DESIREE:
    01-01-12-31-MAR-12-A

    01-02-12-30-APR-12-B
    01-02-12-30-APR-12-D

    01-03-12-31-MAY-12-C

    01-04-12-30-JUN-12-A

    01-05-12-31-JUL-12-B
    01-05-12-31-JUL-12-D

    01-06-12-31-AUG-12-C

    01-07-12-30-SEP-12-A

    01-08-12-31-OCT-12-B
    01-08-12-31-OCT-12-D

    01-09-12-30-NOV-12-C



    Thanks in advance,
    Shoaib

    Published by: Shoaib581 on March 4, 2013 03:34

    Maybe, you need not curls at all.

    See the solution using pure SQL, enabling scaling of your PL/SQL counterpart.

    alter session set nls_date_format = 'DD-Mon-YYYY';
    
    create table test_table (contract char(1), st_date date, ex_date date);
    
    insert into test_table values ('A', to_date('01-Jan-2013', 'DD-Mon-YYYY'), to_date('31-Dec-2013', 'DD-Mon-YYYY'));
    insert into test_table values ('B', to_date('01-Feb-2013', 'DD-Mon-YYYY'), to_date('31-Dec-2013', 'DD-Mon-YYYY'));
    insert into test_table values ('C', to_date('01-Mar-2013', 'DD-Mon-YYYY'), to_date('31-Dec-2013', 'DD-Mon-YYYY'));
    insert into test_table values ('D', to_date('01-Feb-2013', 'DD-Mon-YYYY'), to_date('31-Dec-2013', 'DD-Mon-YYYY'));
    
    with data as
    (
      select contract, add_months(st_date, (level -1) * 3) st_date, last_day(add_months(st_date, level * 2)) exp_date
        from test_table
      connect by level <= 4
             and prior contract = contract
             and prior dbms_random.value is not null
    )
    select contract, to_char(st_date, 'DD-Mon-YYYY') st_date, to_char(exp_date, 'DD-Mon-YYYY') exp_date
      from data
     order by st_date, exp_date, contract;
    
    CONTRACT ST_DATE              EXP_DATE
    -------- -------------------- --------------------
    A        01-Apr-2013          31-May-2013
    B        01-Aug-2013          31-Aug-2013
    D        01-Aug-2013          31-Aug-2013
    C        01-Dec-2013          30-Nov-2013
    B        01-Feb-2013          30-Apr-2013
    D        01-Feb-2013          30-Apr-2013
    A        01-Jan-2013          31-Mar-2013
    A        01-Jul-2013          31-Jul-2013
    C        01-Jun-2013          31-Jul-2013
    C        01-Mar-2013          31-May-2013
    B        01-May-2013          30-Jun-2013
    D        01-May-2013          30-Jun-2013
    B        01-Nov-2013          31-Oct-2013
    D        01-Nov-2013          31-Oct-2013
    A        01-Oct-2013          30-Sep-2013
    C        01-Sep-2013          30-Sep-2013          
    
     16 rows selected 
    

    Published by: Jen on March 4, 2013 K 17:57
    Ordered the contract as well as the results posted by OP.

  • How to get data from one or several times of perticuler dates

    (1) how can we get data from one or more dates perticuler.
    for example. date of 01/01/2011 and time is 00:00:00 to 23:59:59

    and

    (2) how can we get data from one or more dates perticuler.
    from date 01/01/2011 to 01/02/2011 date and time e.g. is from 00:00:00 to 23:59:59.

    can we?

    Hello

    Use a WHERE clause to include only certain lines.
    For example:

    SELECT     *
    FROM     table_x
    WHERE     dt     BETWEEN TO_DATE ( '01/01/2011 00:00:00'
                        , 'DD/MM/YYYY HH24:MI:SS'
                        )
              AND     TO_DATE ( '01/01/2011 23:59:59'
                        , 'DD/MM/YYYY HH24:MI:SS'
                        )
    ;
    

    In this example, the first date (before the keyword AND) and second (after the keyword AND) lie on the same calendar day. It's just a coincidence, they can be on different dates.
    The first date must not be later than the date of the second; If this is the case, you will get 0 found lines.

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all tables and also post the results desired from these data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.

  • Global temporary table Vs Table permanently to manipulate the transaction data

    Hi all

    Version of database - 10.2.0.4

    We need handle transactions, data in a table and put in an intermediate table (ie): to replicate the data in the tables of a schema of staging of the tables in the schema. Get info on transactions and handling.
    Can you please indicate which one of the below is the best option.

    Option 1:
    Create a global temporary table, each running process.

    Option 2:
    Create a table permanently and delete lines at the beginning of the process.

    Job expects every 5 minutes

    Thank you and best regards,
    Rakesh

    If data are transient and must be written to the disk (I'm not sure I follow your explanation for why written data on the disk are necessary - you have to touch table large transaction each time to fill the intermediate table) using a global temporary table. At least, you'll reduce the cost of writing the data to disk by generating less recovery.

    But ideally, you would not write the data on the drive at all and would be able to do it in SQL.

    Justin

  • getting data from two servers?

    Experts-

    We have two servers for the storage of the tables. 1 history 1. current server Prod

    We have same tables in the databases server.

    All the info before one month from the date of the day are stored in database tables history server
    and the rest in database tables current prod server.


    I create reports such as when the user enters a date, OBIEE must check if the date is in a month (30 days) the date today or earlier at 30 days, on this basis, it must get data from historical Server database tables / running production database server.

    How can I implement this?

    I need to create two clusters of connction (RPD records) and develop the same model twice? (One for the historical paintings and one for prod tables?)
    or can I use the technique of fragmentation? If so, can you give me an idea hwow to implement the Fragmentation of this requirement?

    Thank you for your help in advance

    You must use the fragmentation of this requirement. It is not difficult once you understand the basic principle. Nico article read here for details:

    http://gerardnico.com/wiki/dat/OBIEE/fragmentation_content

    The only non-standard bit for you will be to define the criteria of fragmentation on your sources of logical table. This is the part that says BI server to hit source.

    After return here if you get stuck.

    Paul

  • NETUI-data: Repeater for haspmap?

    Could someone advise me how to navigate through a hash table using netui repeater to display keys and values on the jsp page.

    Here is my code:
    HashMap Structure:
    
    Key                          Value
    Question Label          List<AnswerBean>
    
    JSP Code:
    
    <netui-data:repeater dataSource="pageFlow.surveyForm.surveyAnswers">   // this returns the Map<QuestionText, List<AnswerBean>> , Answers contains answer Id and answer Text.
        <netui-data:repeaterItem>
               <netui:span value="${container.item}"/> //display the question text
                <netui-data:repeater dataSource=""> // here i want to iterate through the values (List<AnswerBean>)
                       <netui-data:repeaterItem>
                                <netui:span value=""/> // here i want to display the answer (answerBean.answerText)
                       </netui-data:repeaterItem>
                </netui-data:repeater>
        </netui-data:repeaterItem>
    </netui-data:repeater>
    Appreciate your help.

    Thank you

    Container.Container.Item == Map.Entry (i.e. the parent object)
    On what object is surveyQuestionLabel?
    You probably mean container.container.item.key.surveyQuestionLabel (on the assumption in the question text object)
    OR if it is AnswerBean then container.item.surveyQuestionLabel

    concerning
    Deepak

  • How to fix or get data off Mac Pro with display/restart issues

    Hi, my early 2008 Mac Pro running El Capitan suddenly started to show lines all over the screen, then it restarted, displaying an error message and since then he's been stuck in a reboot loop never get past the progress bar and with very distorted display. Two questions:

    (1) any solution to this? It is an old machine, worked great so I would like to continue using it if possible, but do not want to put money in it at this stage.

    (2) what is the best way to get data out of the two internal drives to the machine on my Mac Air? I need to access the files on it, also like his 2 x 1 TB hard drives I will not be able to transfer the data on Air, but you will need to use them as external drives.

    Help appreciated!

    Get a dock like this

    http://www.felinediabetes.com/FDMB/forums/feline-health-the-main-forum.28/

    and take the readers on the Mac Pro and put them in the dock and connect to new mac via USB

    You can also get an enclosure that accept disks 3 1/2 in.

    In addition, you can get a bolt of lightning > FireWire adopter and connect the two Macs via FireWire and start the old mac in target disk mode

    How to use and troubleshoot disk mode target FireWire - Apple Support

    The error message say? Problem could be the graphics card bad or maybe bad memory.

    If you open the side cover are all diagnostic lights on?

  • When I click on an e-mail link in Firefox, I get a message in the left corner of my screen that says "mail to: email address. Outlook will not open upward as it does in Internet Explorer. I set Outlook as my default email in Windows 7.

    When I click on an e-mail link in Firefox, I get a message in the left corner of my screen that says "mail to: email address. Outlook opens automatically as it does in Internet Explorer. I did my default email in Outlook in Windows 7.

    This has happened

    Each time Firefox opened

    Is when I upgraded to Windows 7.

    See this:
    http://support.Mozilla.com/en-us/KB/changing+the+e-mail+program+used+by+...

  • How to get data from excel

    Hello world

    How can I get data from excel inside my program? I'm using labview 8.2. I have tried to find the solution for this but seems that the solutions are not suitable. Can someone help me? Thank you.

    Hi jieah,

    Inside of the attachment nijams don't you see this?

    read_excel_values. LLB

  • Office toolkit 'excel get data' cannot read anything else of integers?

    I use LabVIEW 2009 and can not get LabVIEW to read non-entiers to a worksheet.  In the attached example, I put a breaktpoint after the new report vi, and and when it hits at this breakpoint I put a number as 1,234 in cell A1, and then continue execution.  But the 'data' outputs always return an integer value.  Even tried to change the format of the output of the data field.  I also tried to replace this with vi (LDM) Excel Get Data in the folder of the Toolbox, but got the same result.

    When I tried the same thing in LabVIEW 8.0 it worked.  No idea what I am doing wrong?  :-)

    Thank you

    -Bill

    Your meter is complete after you have changed the type of indicatpr, then you can get good results.

  • Apparent problem with OpenG Get Data Name_ogtk.vi

    The data Name_ogtk.vi Get OpenG is a function that takes a data Structure and returns the name of this structure if the Data Structure has a name.

    I use it in my Configure.vi. Configure.VI takes several data structures and saves / loads to an INI file. The name of the section in the INI file is the same as the name of the Data Structure. When loading, Configure.vi takes the name of the data structure to load and locate the Section in the INI file with the same name and then uses the items listed in the INI section to load the Data Structure with the data values.

    In my case, I have 3 sections. Two of the sections, 1 Servo and Servo 2 derive from the same Type definition. I am trying to load 3 of the attached INI file data Structure. The Config.ini in the system file has been generated by the backup function Configure.vi. I'm passing in the routine of the load, 3 Data Structures, each with unique names. I have an explicit call to get the data for Servo 1 Name.vi and 2 Servo. But the probes on the output of the Name.vi of data values get two return to the same 'Servo 1' same string if sensors on the Structure of data entries that clearly indicate them the unique names of the "Servo 1" and "Servo 2" respectively.

    It seems that the 2nd Get data name returns the name of the Data Structure 1 by mistake. If anyone can check this?

    Does anyone know how to fix Get Data Name.vi so that it returns the appropriate data Structure names?

    Thank you.

    I was able to reproduce it and I show here as an oddity to force entry to the variant on the primitive flat string Variant.

    Basically, if you have more than one cluster with content command to match the type and order wired directly to this function, it returns the flattened string which is first to each call.  The wires must be wired without before converting to alternative, if you have points of constraint.

    This only happens if you feed directly the input varying both and get the stress points.  If you are using a variant is not the case.

    I found that this occurs if the cluster is of type defined, and it does not occur for constants.  I didn't try other controls.  I'll be honest, I'm usually used to constrain to the Variant.  I'll be more careful in the future!

    ----

    so convert to first variant will solve your problem.  In addition, if you leave the entry of the section name of the variant config openG write screw unwired, he will take the name as it is the research of the control, you did, so you need not the name of data Get there at all.

    An excerpt from 2009.  as - is equal to true.  The bunches are each a dbl and a bool, but each FP different controls.

  • Y510 unable to get data from the camera.

    Hello

    I have a Y510 with Windows Vista 32 bit, 3 GB RAM, only 5 weeks. I get this message when I try to use Veriface, "unable to get data from the camera. The camera may have been disconnected or busy. I reinstalled Vista of the State in which the laptop came, but it does not work. I also updated the bios and install other updates were available. I would appreciate any advice.

    Thank you

    Peter

    I wish it was as easy as press Fn + Esc, I looked through an another Y510 our office and managed to find a process that must be set to Auto, the process is KtmRm. This process cannot be disabled, handicapped, or on a time delay, it must be AUTOMATIC.

  • get date and time seconds

    I am using get date time in seconds, the function to send the date and time to a sub vi where I can use it to calculate the time difference in timestamps of waveform and the hour when he began to get the time in seconds. So I wanted to know if I pass this value to a sub - vi will be this value constantly updated in the sub - vi or it will remain constant until the sub - vi is finished.

    Yes it will remain constant because the time was read only once, to hand.  Any value is passed to the Subvi remains the same.  If you want once updated, you must put the function get Date/time inside the Subvi.

Maybe you are looking for

  • C870-1F3 satellite - cannot use and WLan connection

    Hello My father had this laptop with windows 8 during about 6 to 8 weeks, everything was ok, but today it can not connect wireless at all, if I plug in the modem the internet works fine. I tried loo t to the net - and tried FN and F12 but no joy, I d

  • HP envy 17: I would like to upgrade my WiFi adapter

    Product name: HP ENVY 17 Notebook PCProduct number: L0G03EA #ABUSerial number: 5CD450296XBIOS:F.30-10/22/2014Keyboard Review: 78,13Total memory: 16 h 00 GBName:Intel (R) Core i7-5500U CPU @ 2.40 GHz processor My current network card: Broadcom BCM4314

  • CVI Api Window7

    Hello Actally, I develop my stuff under XP. Everything works fine. Were a few machines running Windows7. The machines are broken in the custom user interface created with .net during execution of the models modelsupport2.dll GetReportBody_CImplementa

  • There are not more than 600 dpi of resolution

    The specs say I can scan with resolutionOptical: up to 1200 dpi; Material: up to 1200 dpi; Improved: up to 2400 dpiBut is not possible on the 600 dpi.Why? 4645 HP deskjet ink advantage Windows 7

  • Computer restore question

    I recently restored my computer back to factory settings and I was wondering if I should put the updates of Windows on the first, or if I should put my anti-virus on the first and update it.  Thanks to all those who respond.