How to do in memory of POJO based ADF table sorting?

Hello

JDeveloper 11.1.1.7

I created a Web of merger application. In the template project created the POJO (Product.java & ProductBean.java) to fill data class. Data created controls from ProductBean.java and then drag on the page jspx.

Product.Java:

package model;
public class Product {
    private String productId;
    private String productName;
    public Product() {      
        super();
    }
    public Product(String productId,String productName) {      
       this.productId=productId;
       this.productName=productName;          
    }
    public void setProductId(String productId) {
        this.productId = productId;
    }


    public String getProductId() {
        return productId;
    }


    public void setProductName(String productName) {
        this.productName = productName;
    }


    public String getProductName() {
        return productName;
    }
}

ProductBean.java:

package model;


import java.util.ArrayList;
import java.util.List;
import model.Product;


public class ProductBean {
    private List<Product> products=new ArrayList();
    public ProductBean() {
       this.createData();
    }
   
    private void createData(){
        System.out.println("Cntl in createData :::");
        products.add(new Product("101","Alto"));
        products.add(new Product("102","Benz"));
        products.add(new Product("103","Chevrolet"));
        products.add(new Product("104","Cruze"));
        products.add(new Product("105","Accord"));
    }
   
    public List<Product> findAllProducts() {
        System.out.println("Cntl in findAllProducts :::");
        return products;
      }  
}

The jspx fills in the data as expected. But when I do a sort in any column of the table, the findAllProducts()'s called making and data get recovered. I want to like her in memory to improve performance of sorting.

I tried two ways by setting the property conditions and cacheResults refresh of the iterator iterator, but it did not work and it always gets the data while sorting.

Can anyone help/provide entries?

~ Abhijit

It's my bad all by looking at the newspaper. It is not firing the quey (here createData() method) while sorting. the code above, I posted, works very well. Thanks Jacques and Natasha

~ Abhijit

Tags: Java

Similar Questions

  • How to get choose a choicelist value of adf table bean

    Hello

    I use Jdeveloper 11.1.2.3.0.

    I have a table with one of the columns as adf select a list of choices. On the change of value, I want to get the selected value in the bean.

    When I use valueChangeEvent.getNewValue () in the bean, it gives me the value index.

    How can I get the value selected instead of the index?

    Thank you

    Vinod

    You can use code below in the bean to get the exact value.

    Code is the name of the field that exist in the pageDef

        BindingContainer bindingsLOV = getBindings();
        JUCtrlListBinding listBinding = null;
        listBinding = (JUCtrlListBinding) bindingsLOV.get ('Code');
        ViewRowImpl selectedListRow = null;
       

    selectedListRow (ViewRowImpl) = listBinding.getSelectedValue ();

    String _Nom = selectedListRow.getAttribute("Code").toString ();

    also check this: https://blogs.oracle.com/adf/entry/getting_selected_value_from_selectonechoice

    Habib

  • Synchronize the forms with self-referential VO on the Board of the tree. POJO-based model

    Hello. I need your help

    Sample ADF Code corner #32 show how to build a picture of the tree to a self referencing VO:
    [http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples]

    Paper corner Code ADF Oracle JDeveloper OTN harvest/09/2011 by Frank Nimphius show how to build a form of modification of the table data and synchronize it with the selected line in the table of the tree:
    [http://www.oracle.com/technetwork/developer-tools/adf/learnmore/sept2011-otn-harvest-508189.pdf]

    These examples are useful, but I have a problem, I don't have a model based on a database, my application datamodel is based in POJO objects, there is no appModules or ViewObjects so I do not know how to reference the tree table attribute target with the iterator form edit.

    Can someone help me?
    Perhaps (I don't know how) I do a VO and an AppModule that encapsulates the model POJO?

    Thank you very much

    Hello

    It should work the same. You create a tree of a POJO data control based on your POJO model. Expose another collection pointing to the same set of data and drag it onto the form. Use the setting in the configuration tree dialog box to set the current line in the tree as aware of the iterator of form.

    Frank

  • How can I view a Windows DVD based on my iMac

    How can I view a Windows DVD based on my iMac

    There is no such thing as a Windows based DVD, they can be read by all computers. Of course, you will have a DVD player for your iMac, Apple made one retina or you can find other retailers such as Amazon or my personal favorite OWC (www.macsales.com).

    But what is important is the content of the DVD, if you can give us a clue it then we can tell you more.

  • Portege Z930 - how to clear the memory of the fingerprint sensor?

    Hello

    Tell me how to clear the memory of the fingerprint sensor?
    Reinstall the operating system and now I can not add your impressions.

    They have their No....

    > Reinstall the operating system and now I can not add your impressions.
    Stand by. You have reinstalled OS using original recovery image?

  • Photosmart 7520: How to erase the memory of my 7520 HP printer all in one?

    How to erase the memory of my 7520 HP printer all in one?

    I try to delete all personal data before recycling.  I also want to remove the password of wireless network that seems to be in memory?

    From the front panel access home, installation, tools, Reset Factory Defaults.  Also make sure that camera cards are removed from the slots on the front panel.

  • Satellite Pro L50 - a: how to replace the memory, HARD drive and battery

    I just uploaded 2 new video from Youtube on the L50 - A. Satellite Pro

    The first is a tear down showing how to replace the memory, hard drive and battery (you can also clean the fan if it detects overheating).

    http://www.YouTube.com/watch?v=IG0lW7t92bI

    BTW why they made it so difficult to get just to the battery in this model?

    WARNING - proceed at your own risk and don't forget static precautions!

    Hope they help and if you have any questions let me know.

    + The message was edited: link has been removed ad channel may not +.

    Thanks for these videos. It may be useful to replace the memory, but I think that the owners of the laptop should not open the case. This may void the warranty.
    Be careful about this.

  • Tecra R10 - how to remove the memory module?

    Hello!

    How to remove the memory module?

    Get the following message and for me, it means that one of the modules is broken:

    Out of memory error
    Address = H 00034000
    Read Date = H 28034000
    Write data = H 00034000

    For my opinion, the computer should start up again when I remove the memory broken slice?

    The Australia has soon

    Hello

    You can easily remove the memory modules.
    I think that the Bay is placed at the bottom of the unit.
    Remove the screw that is blocking the Bay, and you will have access to the module.

    Here is a video of how do this on another Satellite L500 laptop. But the procedure is not very different on Tecra R10
    http://forums.computers.Toshiba-Europe.com/forums/Ann.jspa?annID=81

    I hope this helps a little

  • Satellite A100 - how to remove the Memory Stick Pro DUO card slot

    Hey,.

    I really need help with how to remove my Memory Stick Pro DUO card slot.

    The laptop read the stick very well and I can see all the files into it but I can't seem to get out. I tried to push a little to get out, but it does not work and it's also pretty far in so I can't get out.

    Anyone have any ideas?

    Thank you

    Hello

    To my knowledge there is no extra help for Memory Stick Pro DUO removing as on the PCMCIA port.
    You should try to get him out. If you n t manage to pull him out with you fingers, you can use a pair of tweezers.
    But be careful.

  • How to set the memory of the Geforce 7300 in Satellite A200-10W?

    Hello
    my laptop Satellite A200-10W, came with a Geforce 7300.
    I know that the card has its 256 MB dedicated memory, but I don't know how to use shared memory.
    In other how can words, I use the committed memory, as well as the memory shared of my cards.
    Thank you.

    Hello

    just for info: won´t you get more than 256 MB of RAM. The only graphics memory is your dedicated, I Don t know what you mean with that shared, in my view, there is no available shared mem.

    Welcome them

  • Satelite C670-1DW: how to increase shared memory?

    How to increase shared memory for display from 64 MB to 512 MB?

    Hello

    It is not possible.
    You cannot change the value manually the graphic card driver controls cela and it changes automatically.
    In addition, your laptop supports an internal graphics Intel HD (HM55) card and this chip is not really suitable for the game.

  • Satellite A100-692 - how to reduce graphic memory?

    Hello!
    I'm looking for information how to reduce graphic memory. I have Satellite A100-692, PSAA9E-09900QGR and install 1024Mo RAM but 512 MB is dedicated to graphics memory. Because of this I have 512 MB of RAM in real-time only.
    I would change it. Should be spend of only 256 MB memory graphics. I checked the BIOS (ver. 2.00) and graphic drivers and anywhere is option for memory graphic change.

    Please help how do.

    Hello

    You described your situation, but this seems very strange.
    As far as I know, the laptop uses a 128 MB ATI MOBILITY RADEON X 1400 graphics card and this isn't a memory sheared graphics card!
    This card uses own 128 MB and must share main memory!

    I put t know why you suggested that you have only 512 MB.
    How did you test it?

  • How to free up memory

    Hello

    Forgive me, but I'm so inexperienced with the Mac and I have a really basic question. I am trying to install OS X Lion mountain and get a message that it needs at least 2 GB of memory. How do I "free" memory space so that I can download?

    Thank you!

    This means that a MINIMUM of 2 GB must be installed! a 2008 iMac can accommodate up to 6GB OWC (www.macsales.com) made a kit. Incidentally the ML is not generally available, the latest version of Mac OS X's El Capitan 10.11.1.

  • How can I add memory to my iPad 2?

    How can I add memory to my iPad 2?

    You do not have. iDevices do not have expandable memory.

    You can get a device like the WiDrive in Kingston, which is a portable drive that you connect your iPad to (via a wifi network that is created by the reader) and you can stream media and transfer files in this way.

  • Pavilion TouchSmart Sleekbook 15-b195sa - how to add a memory Module?

    I just bought a Pavilion TouchSmart 15-b195sa and an additional memory of 4 GB module so that it can bring to 8GBRAM - on order directly from HP.  I was expecting there to be a module cover removable memory on the underside of the laptop - it does not exist.  How to install additional memory?

    I looked on the HP site but no use, it leads me to a page that shows a removable cover...

    Adding memory to a sleekbook that is as thin as your new is a bit much for the average homeowner to laptop.

    The details in the image coming from the maintenance & service guide for the Pavilion TouchSmart Sleekbook 15.

Maybe you are looking for