Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8982239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:31:58+00:00 2026-06-15T20:31:58+00:00

Basically I’ve got a JSF page with a number of components, including an ADF

  • 0

Basically I’ve got a JSF page with a number of components, including an ADF table populated with a List of data returned from a getData() method in my data control class.
Above the table I’m trying to display some calculated values from the data displayed – but the field values are not being displayed correctly.

(I’m using JDev 11.1.1.5)

The data control class is called RecentDeals and the getData() method returns a List of Deal objects that includes a number of fields (dates, values, names, etc).

The RecentDeals class also contains private variables to store the calculated (average) values to be displayed above the table (eg. avgSize, avgTerm, avgRent, etc).
In the same getData() method, after iterating through the List of Deals to perform required calculations (and storing the respective values along the way), the variables are updated with the calculated averages before returning the List of Deal objects that populates the table.

Below is an excerpt of the code for reference:

public class RecentDealsDC {

    private Double avgSize;
    private Double avgTerm;
    private Double avgRent;
    ...

    public RecentDealsDC() {
        super();
        avgSize = 0.0;
        avgTerm = 0.0;
        avgRent = 0.0;
        ...
    }

    public List<DealDTO> getData(List<String> businessUnits){
        List<TransactionDTO> transactions = new ArrayList<TransactionDTO>();
        List<DealDTO> deals = new ArrayList<DealDTO>();
        TransactionSessionBean transBean = lookupTransactionSessionBean();

        Double size = 0.0;
        Double term = 0.0;
        Double totalBaseRent = 0.0;
        ...
        Integer recordCount = 0;

        if (businessUnits != null && !businessUnits.isEmpty()){
            transactions = transBean.getDealsData(SystemUtil.getCurrentUser(), businessUnits);

            recordCount = transactions.size();

            if( recordCount > 0 ){
                for (int i=0; i < recordCount; i++){
                    TransactionDTO transObj = new TransactionDTO();
                    DealDTO dealObj = new DealDTO();

                    transObj = transactions.get(i);

                    // process transaction, execute logic, store deal values

                    size = size + transObj.getRentableArea();
                    term = term + transObj.getLeaseTerm();
                    totalBaseRent = totalBaseRent + (transObj.getRentableArea() * transObj.getBaseRent());
                    ...

                    deals.add(dealObj);
                }
            }

            avgSize = size / recordCount;
            avgTerm = term / recordCount;
            avgRent = totalBaseRent / size;
            ...

        }

        return deals;
    }
}

When I run my JSF page it correctly displays the data from the List of Deal objects but the calculated fields just display zero.
When the user selects the next “criteria” to populate the table (from a dropdown list in the header), the calculated fields are then updated with the previous stored values.
So in other words the header fields are showing the averages pertaining to the previous set of data and the cycle seems to continue for each subsequent user selection – so the user is forced to select another value to get the averages needed, which is obviously not acceptable.

I have confirmed in debug mode that the calculations are being executed correctly and the correct values are stored in the private variables before the List is returned.

Not sure what I’m missing here but I’m thinking I need to somehow “refresh” the outputText components to display the expected values right away.
That is what I’m researching but at something of a loss right now.

Any suggestions/direction/ideas would be really appreciated.

EDIT: It looks like the outputText fields also update when I collapse and re-expand the panelBox they are contained inside. So I’m wondering if there’s some way for me to manually perform that same update…

Thanks,
Karim

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:31:59+00:00Added an answer on June 15, 2026 at 8:31 pm

    The solution I came to is as follows:

    Revised the DC class getData method to return a new DTO that contained the original List resultset and the 4 variables I needed to display.
    Then I bound the resultset and variables from below the returned DTO to the same respective components (resultset in ADF table, variables in 4 outputText fields in header above resultset table).
    Then I added a Refresh=”IfNeeded” property to the Iterator for the attribute bindings.

    Now my outputText fields refresh as expected at the same time as the resultSet changes!

    Karim

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically what i am trying to do here is to read from the table
Basically from C++ FAQ I learned that: A virtual function allows derived classes to
Basically I have a large set of data in excel, and I was wondering
Basically, I have a list of delivery checkboxes one for deliver to this address
Basically, what I'm trying to create is a page of div tags, each has
Basically I saw this page THIS PAGE and if you scroll up and down
Basically I just need the effect of copying that HTML from browser window and
Basically I have a field in my table called sex, and it's a boolean.
Basically, I have a textbox where a user can enter an ID from a
Basically, I want to get and display the data of a midi note (the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.