ADF BC - Refresh VO reference entity

Hello,
I have a view object with an updateable entity and a reference entity. I want to enter the 1st entity attributes (including foreign key) and have reference entity attributes populated automatically after some button click. I don't want to issue commit.
What should the button action look like? Will the view object currentRow.refresh(...) do the job?

It definitely doesn't have to be this complicated.
Simply write a method on your application module that does everything you want inside that method. Then, invoke that method from the view/controller layer.
Due to the ADF BC active data model, the page will automatically update to show the refreshed foreign key information -- though you may need to correctly setup your Partial Page Rendering "Partial Triggers" properties to get the UI to repaint the updated values.
Let me know if you still have questions.
If you do still want to do it from the view/controller layer in your backing bean, you have to set the value of the binding, you could use a helper class like this:
package demo.view.util;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
public class EL {
   public static boolean test(String booleanExpr) {
     return Boolean.TRUE.equals(get(booleanExpr));
  public static String getAsString(String expr) {
    return (String)get(expr);
  public static Object get(String expr) {
    FacesContext fc = FacesContext.getCurrentInstance();
    ValueBinding vb = fc.getApplication().createValueBinding(expr);
    return vb.getValue(fc);
  public static void set(String expr, Object value) {
    FacesContext fc = FacesContext.getCurrentInstance();
    ValueBinding vb = fc.getApplication().createValueBinding(expr);
    vb.setValue(fc,value);   
}Then from your backing bean, assuming your attribute binding for the primary key attribute is named "MyPKAttr", you could write:
  EL.set("#{bindings.MyPKAttr}", newValue);However, I repeat, if you are writing code that invokes an application module method to get a result, and then you pass that result back to another application module method, this is a signal that you should just encapsulate all of those details inside the service itself instead of having to do it in multiple steps.
See Chapter 8 in the ADF Developer's Guide for Forms/4GL Developers for a number of tips about creating custom methods in your application module.

Similar Messages

  • Nullpointer: Reference entity null

    Hey,
    I have an view (PremiebetalerView) that consists of 4 entities:
    - PolisRelatie (updatable)
    - Relatie (reference FK between PolisRelatie and Relatie)
    - Straat (reference FK between Relatie and Straat)
    - Beroep (reference FK between Relatie and Beroep)
    In the SQL I added an outer join: PolisRelatie.REE_REE_ID = Relatie.REE_ID (+).
    I have also a Car view and a view link between CarView and PremiebetalerView, with CarView the master.
    In java code I create a Premiebetaler view row instance and set some defaults of the PolisRelatie entity. When I select in other screen a Relatie I want to set this ID in the column REE_REE_ID of the polis relatie and refresh the relatie (row.getRelatie().refresh(PremiebetalerViewRowImpl.REFRESH_CONTAINEES)). This works well in my first CarView instance but when I copy this instance to a new view row and again create a Premiebetaler view row instance then row.getRelatie() evaluates to null so I can't refresh the entity.
    Why is this entity null and how can I 'initialise' this entity?
    Thanx, Marianne

    Workaround: update the reference entity manually.
    Create a custom ViewRowImpl (generate accessors) for the view, and for the foreign key attribute, use a setter that goes something like:
    public void setQuoteSheetId(Number value) {
      setAttributeInternal(QUOTESHEETID, value);
      // workaround ADF bug
      // if not equal
      if ((value != null) ? !value.equals(getpkQuoteSheetId()) : (getpkQuoteSheetId() != null)) {
        // find the correct entity and set it
        if (value != null) {
          ViewObject quoteSheetView = getApplicationModule().findViewObject("QuoteSheetView1");
          Key key = new Key(new Object[] { value });
          Row[] rows = quoteSheetView.findByKey(key, 1);
          if ((rows != null) && (rows.length == 1) && (rows[0] != null)) {
            ViewRowImpl viewRowImpl = (ViewRowImpl)rows[0];
            setEntity(4, viewRowImpl.getEntity(0));
          } else {
            throw new RowNotFoundException(false, quoteSheetView.getName(), key);
        } else {
          setEntity(4, null);
    }where
    getpkQuoteSheetId() is the getter for the primary key attribute of the reference entity,
    "QuoteSheetView1" is a default view of the reference entity,
    and 4 is the index of the reference entity for the view.

  • ADF: Tree Refresh after Expanding a node. Please Frank have a look!

    About this post:
    Re: ADF: Tree Refresh after Expanding a node
    Frank answered that he doesn't notice that behavior. I found out that this happens if an appication uses a custom skin.
    In SRDemoSampleADFBC, SRManage.jspx (Management from menu), if you make the explorer window small enough not to cover the whole tree, you can notice this (the page jumps to the top).
    Now if you change in adf-faces-config.xml the "skin-family" tag to "oracle", you will see that the tree component has changed (it has no triangle icons why this happens) and the page doesn't refresh.
    Minas

    It seems that there's more to the tree expansion icon than the skin definition. We're using the minimal skin and ADF puts out a special character to represent the disclosure symbol (which by the way, renders differently on IE6, than IE7, than Safari or Firefox on Mac). However, switching to the Oracle skin, the disclosure symbol comes out as a full-on image (triangle including the +). We have found this frustrating because the triangles seem not sufficiently suggestive to our users - but switching to the Oracle skin has other issues with white-on-white text.
    But in any case, the tree refresh after node expansion is another annoyance as I described in the other thread linked here (including URL to see problem in action).
    Cheers, Mark

  • Adf bc jar for base entity classes and extending them existing  project

    Hi,
    I am using jdev 11.1.1.0 and have created a base workspace/project and adf jar for my base entity classes.
    1. I can consume this base adf bc jar in a separate new consuming workspace and create VO based on base bc classes or create new EOs that extend base bc entity classes.
    2. Furthermore, for an existing consuming project that earlier included src/ of base entity (BC components), i can remove the dependency on bc source and bring in this new adf jar and everything including the view controller and the service/datacontrol works fine.
    The issue i am running into is as follows.
    - In the existing project (#2) above i try to create a couple of entities based on entities in my base jar; associations are automatically brought in. Note i am not overriding any attributes. My intent here is to generate .java and implement some code.
    - I then try to make my existing VOs based on the newly extended entity (VO overview->Entity Objects-> Shuttle NewEntity from Available to Selected)
    - I then try to remove the old EO from selected under VO overview->Entity Objects->Shuttle OldEntity from Selected back
    - I get a warning dialog box that says something to the effect that some viewlinks are dependent on these old EOs in this consuming project.
    - I tried to laboriously analyzed dependencies and it this dialog box does not make any sense as I have already extended EOs and the tooling should be able to let me use these
    My questions
    - Why I am not able to remove old entities from VO dependencies
    - Is it ok to leave the old EOs in "Selected" along with the newly extended EO ? What are the implications for this?
    - I also thought about extending base associations, but did not go anywhere.
    In general, I am ok with consuming an ADF BC jar that has entities etc. but not clear about removing dependencies of base EOs on VOs when entities are extended and consumed in a pre-existing project that used base entities.
    I can send a project if any PM is willing to take a look at it.
    Thanks,
    ps:
    I have already gone over the following info
    http://technology.amis.nl/blog/215/organization-of-bc4j-domain-eo-and-business-vo-package
    .. wants to create an enterprise data model in BC4J, reflecting the Enterprise Data Model set up in the RDBMS. All (or at least most) business rules will be implemented in the Middle Tier – to take the load of the database and also allow developers not comfortable with PL/SQL to define and maintain the business rules. It is clear that this means that all applications that need to access – and manipulate – the database, need to go through the BC4J foundation layer. Martijn wants to define the Entity Objects – and their business rules – only once and share that definition between different projects. Each projects can create its own ViewObjects on top of these shared Enterprise Entity Objects.
    http://radio-weblogs.com/0118231/2005/09/29.html
    I am currently working on a project for a partner where we will be using ADF BC as our model layer for a large application. In order to keep the footprint of each application module down to a reasonable size, we are intending to create a number of separate 'root' application modules for each functional area of the application. Within, these 'root' application modules we will then use nested application modules to further partition the application. All of the application modules will be accessing the same datasource and will need access to the same database objects.
    In order to separate our code between the development team and into function areas, our initial thoughts were that we would create an ADF BC model project containing Entity Objects for all of the database tables e.t.c. as these are common amongst all functional areas. We have configured all of the EOs for validation rules, defaulting values and extending doDML() as appropriate. Happy at this stage we then created a simple .jar file to deploy all of the definitions. Upon creating a new ADF BC project for each functional area we added the jar file as a library import into the new project. However when we the tried to create some new View Objects via the JDev Wizard we were unable to see the imported Entity Objects.
    Is the only way to share Entity Object definitions between different ADF BC projects to manually copy the source definition files into the new projects src directory? Since this would mean multiple copies of the same components, it could prove to be a maintenance nightmare.Is there a way of doing it without creating multiple copies of the same object definitions?
    The developer is spot on in their ideas of layering and reuse, and even has created a library for their reusable entities. This last step is not something everyone thinks to do. The missing step is known as "importing" components, so with that one extra bit of knowledge under his belt, he should be able to do exactly what he envisions. My little article called Difference Between Adding and Importing Business Components tries to explain the difference and gives the menu options to choose to perform the importing.
    Difference between adding and importing BC4J
    http://radio-weblogs.com/0118231/stories/2005/08/11/differenceBetweenAddingAndImportingBusinessComponents.html
    Working with Libraries of Reusable Business Components
    http://download.oracle.com/docs/cd/B32110_01/web.1013/b25947/bcadvgen.htm#CHEFECGD

    Hi,
    since you followed the OC4J developer guide I think this question might be better handled there as well
    OC4J
    So in case you don't get an answer here on the forum, try it on the OC4J forum
    Frank

  • ADF Region Refreshing Mechanism

    Hi all,
    i have a doubt on how ADF region refreshing mechanism works. Let me explain my doubts with an example. Suppose you have a page .jspx inside whom you put a region with the following relevant properties:
    - Refresh: ifNeeded
    - Activation: deferred
    - Parameters:
    ID Value
    param1 #{pageFlowScope.myBean.param1}
    param2 #{pageFlowScope.myBean.param2}
    paramN #{pageFlowScope.myBean.paramN}
    As you can see, the region is instructed to re-execute its task-flow everytime any of its parameters change. What i don't understand is if the parameters must be changed in particular ways that let the region know that it must be re-executed or they can be changed in any way, for example from within the method of a managed bean: returning to the example above, if inside myBean i have a method like the following:
    public void refreshRegion(){
    setParam1(new Param1());
    the region gets re-executed everytime i call this method?
    If not so, could you please explain how exactly the region detects that one of its parameters is changed and then it must re-execute its task-flow?!?
    Thanks in advance!
    Bye!
    Fabio

    Hi,
    thanks for the reply. Is there some reason in particular to use variables stored at requestScope level? The mechanism used by regions to refresh theirselves don't should be the same regardless the scope at which their parameters are stored?
    As a technician, i imagine that the only way regions are able to automatically detect the need to re-execute their task flow is putting theirselves in constant listening to eventual changes in the value of their parameters. As far as i know, this is the only way for regions to detect the exact moments when refresh is required, despite the way their parameters are updated. If this is not the case, then i think the assumption according to which regions are able to refresh theirselves no matter the way their parameters are changed is wrong, and i'd like to know the real mechanism that hides behind the refresh of ADF regions.
    You said that:
    " Now, in any of the server code, if you are changing anyone of the above requestScope values, the taskflow would be re-executed "
    Please, let me ask you: even if the code that changes the value runs inside a thread different from the "ADF thread"?
    Thanks again,
    Bye!
    Fabio

  • Mr . Steven  By ADF : how refresh country list with city list

    Mr . Steven By ADF : how refresh country list with city list
    if you have combo box(in Jdev : single select list)
    two list ==> first one : country list
    ==> second one: city list
    when select country from (country list) i want the city
    list refresh and have only the city that in selected country .
    note :
    countryName and cityName are attribute in a view that have two table (country_table , city_table)

    Hi, I've tried this solution, the only problem is that my navigation controls are inserted in a form that is linked to a table.
    Let me give you an example:
    I have a form binded to a table say Problem
    and in that form i have to linked drop lists named Category and Sub category.
    The problem is that if I use the example, there's no way to link my problem field with the navigation control.
    The other problem is that when I change the value of the Category list, it validates the form and I do not want it to be validated.
    Can you help me.
    Thx

  • ADF-BC/JSF Attributes of reference entity objects do not appear on new rows

    Hi everyone,
    Here is something I have been meaning to ask for a long time and never found the time to do so.
    Let's suppose that we have two entities named Item and and ItemType and a view object named ItemsList defined like this
    SELECT Item.ID,
                  Item.NAME,
                  Item.TYPE
                  ItemType.NAME as TYPE_NAME
                  Item.PRICE
                  ItemType.ID AS ID1
       FROM
                  ITEMS Item, ITEM_TYPES ItemType
       WHERE
                  Item.TYPE = ItemType.IDLet's also suppose that using JDeveloper's standard ADF/SF pages, we create a list page and a create page that uses a combo box to allow the user to set the item type which then commits the changes and returns back to to the list page.
    I have noticed that new rows created using this method do not display the TYPE_NAME (and all similar) attributes, until the view is executed again. What I usually do in this case is have an Execute binding that fires only when a request scope variable is set from the creating page. This approach works for me but I feel that there must be an easier and "more right" way to achieve the same results.
    Thanassis

    Maybe you can use the getEstimatedRowCount() method on the view.
    See more info here:
    http://download.oracle.com/docs/html/B25947_01/bcquerying006.htm

  • Strange ADF behaviour: duplicated lookup references

    Hi,
    I'm developing a JSP - Struts - ADF BC application with JDeveloper 10.1.2.1.0 (1913).
    I have the following issue:
    I have a ViewObject based on three EntityObjects, one updatable and two as reference.
    Say the ViewObject is based on the Main Entity 'Dept' and has two look-ups to the 'Emp' entity (one for manager and one for secretary). The ViewObject will show the departments plus the names of the manager and the secreatry for each department.
    Now in my custom struts action I create new rows for the ViewObject and in this new row I set the Id (foreign key) for the Manager programmatically. (This Id is fixed). Now when I show the JSP showing the new rows for this ViewObject, It shows the names of the manager correctly but it also shows the names of the managers in the secretary fields while these Id's (foreign keys) are still empty (null)!!!
    How can I avoid this behaviour?
    I am setting the secretary Id (foreign key) to null but that doesn't help, and trying to clear the name of the secratry in my program is not allowed since it is a read-only field.
    Any help is appreciated.

    Solved this... Using a single XXXXXUIModel.xml file was causing this.
    Tom

  • Row.refresh() applicable to Entity based VO's?

    Hi!
    Is Row.refresh() only applicable to ViewRows of VO's with Updateable Entities?
    How about ViewRows of ReadOnly VO's. In my application, I called a stored procedure which updates an attribute of a table(TABLEA) on the database. Now I the attribute which the procedure updated is displayed on my JSF page through a ReadOnly VO. So Naturally, after I clicked on the button to call the stored proc, I would want the attribute updated as well on my screen. So as soon after the call to the stored proc, I called the Row.Refresh() on the current Row. But sad to say the attribute is not updating.
    Only when I search for that row again, will the attribute be updated.

    Well, I had it fixed. I just needed to re-execute the View after the call to the stored proc inside an AppModule method which is exposed to clients:
    serviceMethod() {
    callableStatement.execute();
    readOnlyVO.executeQuery();
    }the code that I have above would yield the same result as re-executing the iterator that the UI is bound to, right?
    And I just want to make sure/confirm Row.refresh() is only for Entity Based VO's so I can stop using that function on Read Only VO's.
    Im using the BC, ADF bindings, and ADF Faces.

  • Request for ADF 10g books and reference materials

    Hi All,
    I currently have a requirement to develop ADF application using the SOA Suite 10.1.3
    Can anybody suggest any good book or reference materials for ADF BC application development in jdeveloper 10g?
    Thanks in advance.
    Best Regards,
    Justin

    Thanks for the prompt reply. The DataBindings.cpx page is unchanged entirely; the pageDefs have the following (presumably normal) changes:
    - "version" in the "pageDefinition" tag changed from 10.x to 11.1.1.x
    - All iterators have an additional attribute: Refresh = "ifNeeded"
    - All actions have their Action attribute changed from a number to a string, eg. 'Action = "100"' becomes 'Action = "commitTransaction"'
    What confuses me the most is that the number of rows is correct, but the data is not there -- neither in the attributes nor in the iteration variable "row."

  • ADF JSF, refresh collection using a DAO without a database - Best Practice?

    I have previously developed a comprehensive application using ADF 10.12. This application did not use a database, instead I was manually populating collections of objects that data controls were generated for to talk to the ADF components.
    This applciation was based upon the old (10.12) version of ADF and utilised the following structure;
    DataPage (start.jsp) --> DataAction (getRecords) --> DataPage (display.jsp)
    In this instance, by overriding methods on the getRecords DataAction I could populate the collection that was to be displayed on the display.jsp DataPage.
    I am now designing a new application that will hopefully use the latest version of ADF (10.13). This application will also use collections of objects from an external source.
    The structure of ADF 10.13 (faces-config.xml) is different to 10.12 (struts-config.xml) e.g.
    JSFPage (start.jsp) --> getResults (navigation case) --> JSFPage (display.jsp)
    Having read the ADF Developer Guide, and looked through example #60 (onPageLoad) that was developed by Steve Muench, I am aware that there are at least three options that I could use to get populate the collection of objects that are displayed on the display.jsp page when a button is pressed on the start.jsp page;
    1. use a backing bean that extends PageController
    2. use a backing bean that extends PagePhaseListener
    3. use a backing bean that has a specific action that is assigned to the button
    Q1a. which one is the most appropriate/efficient to use?
    When the button is pressed on the start.jsp page, it will be set to call getResults navigation case on faces-config.xml.
    Q1b. Is it possible to detect when this action is triggered, populate the collection of data which is bound the display.jsp JSFPage, and then allow the getResults navigation case to continue execution?
    The application that I am developing will have the following structure;
    recordObject - Object to hold a record
    recordCollection - Collection of recordObjects
    recordDao - DAO use to populate the recordCollection
    When using 10.12 I did not have a separate recordDao (as it was query only) I had a refresh method within the recordCollection.
    Q2. what is the most efficient way of achieving this? there will be one DAO per Collection and approx 30 Collections
    Q3. does anyone have/can point me in the direction of any other examples where actions that trigger call navigation cases are overriden, custom actions are called and then the original ones allowed to continue?
    Thanks in advance for your help/advice
    David

    Thanks for the pointers Steve, they have been very useful.
    This is what I have done;
    set up the following pages and navigation cases (show in bold) on faces-config.
    start.jsp >> getSystems >> systems.jsp >> display >> display.jsp
    systems.jsp >> new >> new.jsp
    systems.jsp << back << new.jsp
    added refreshCollection() as a button to start.jsp
    set the button to call getSystems
    added the collection as a read only table to systems.jsp
    - this works correctly
    added the collection as an input form to the new.jsp page
    added the addNewRecord(systemObject so) function as a button to new.jsp
    set the button to call back
    - this is where I encounter a problem.
    The addNewRecord(systemObject so) function takes a new record as a parameter and adds it to the collection. It is doing this but it is not populating the new record. I know that this is the case because when I return to the systems.jsp page there is a new record within the table but it is empty.
    Q. How do I capture the values from the input form that is on the new.jsp page, set them to a new instance of an object and then pass this object to the addNewRecord(systemObject so) function?
    Thanks
    David

  • ADF-JClient Refresh (Newbie question)

    I've gotta believe this is an easy thing to do with ADF, yet after perusing the documentation I could find (most is struts oriented) I just can't seem to get this working and I'm sure somebody here has done it. Also I'm pretty green when it comes to this ADF stuff so hopefully I use all the right terms, etc.
    I have a simple app, that hooks up to a EJB application using a session facade. I have an Order bean, and I have an order line item bean and as you may guess there is a 1-M relationship between the two.
    I set up the page with all the ADF stuff, and basically both are displayed as JTables. When I go to add a line item I:
    1)want to call the ADF operation to do so
    2) refresh both tables with their appropriate data (orders has a total price item that needs to be incremented)
    3) select the orders JTable's order record that corresponds to the line item I just inserted
    4) select the lineItems JTable's line item record that I just inserted.
    The way I currently try to do this, which doesn't quite work is:
    1) call the ADF operation "addLineItem" passing it appropriate details
    2) define an ActionBindingListener class that has an afterActionPerformed() method that:
    a) calls panelBinding.execute() (to refresh the orders table)
    b) calls ordersTable.changeSelection(x, y, false, false) to try and select the appropriate row in the orders table
    c) calls "getLineItems" operation which looks at the row that ordersTable is pointing to to update the line items table
    d) calls lineItemsTable.changeSelect(x, y, false, false) to select the appropriate row in the line items table
    Doing this, after I add an item, I see the correct order get selected, but then the table seems to switch off of it and select the row at the top of the table (as if a refresh had been requested again). The odd thing is that sometimes the above logic seems to work. I'm thinking my problems probably stem from calling panelBinding.execute(), but I haven't found any other clear way to refresh the data without doing that. What am I doing wrong? or am I right and there is a bug with the refresh?
    Any ideas/suggestions, no matter how stupid it may seem are appreciated. I think this is something simple, I'm convinced I've just missed something obvious.

    I think I figured out my problem. The key was to not use the JTable.changeSelection() method to set my selection post update. I needed to set it on the the JUTableBinding via a using a NavigatableRowset, so I did something like:
    void selectLineItemRecord(Long oid)
    JUTableBinding tableBinding = (JUTableBinding) panelBinding.findControlBinding("lineItemList");
    NavigatableRowIterator iter = tableBinding.getIteratorBinding().getNavigatableRowIterator();
    if(oid != null)
    for(int i = 0; i < iter.getRowCount(); i++)
    Row row = iter.getRowAtRangeIndex(i);
    if(oid.equals(row.getAttribute("oid")))
    iter.setCurrentRow(row);
    return;
    // fall through if not found or oid doesn't exist
    iter.reset();
    This seems to work much better now. Now if I just need to figure out some scroll bar stuff and I should be all set.
    FYI, the thread I garnered this information from is Re: JTable returning to previously selected row after executeQuery()

  • ADF graph refresh

    Hi,
    I am new to ADF and while learning, I am stuck in a problem and couldn't find a solution since long.
    I
    am explaining my demo project scenario as below , sorry for making it long .....................
    I have two java class, ClassID that returns IDs of the student in an arraylist and ClassMarks that returns sum of marks for that ID(it returns Id and sum(marks) as arraylist. I have created data model for these two classes, using rt clk and 'create data model'.
    Next, I created a JSF page and on the top I dragged the IDs data model method as 'select one choice'. Below that I dragged the marks method for the 2nd class model as a dvt bar graph
    I added a button from the control palette .
    In the button action I am adding the selected ID from the SOC into session variable. The end logic for the graph class is that it will pick the value from the session and based on the ID, it will fetch rows from database and return an array list of ID and marks. and create a graph.
    But the problem i am facing is that, when the first time page loads, it loops through the datamodel for the ID and graph. and creates the page without any graph as no value was there in the session. when I select one ID and hit the submit button, the graph doesnot refresh with the new values.
    Please help me out. I tried googling and read forums but every where it is shown as ADF BC from table and i have not used that.
    Thanx in advance.

    Hi,
    I am new to ADF and while learning, I am stuck in a problem and couldn't find a solution since long.
    I
    am explaining my demo project scenario as below , sorry for making it long .....................
    I have two java class, ClassID that returns IDs of the student in an arraylist and ClassMarks that returns sum of marks for that ID(it returns Id and sum(marks) as arraylist. I have created data model for these two classes, using rt clk and 'create data model'.
    Next, I created a JSF page and on the top I dragged the IDs data model method as 'select one choice'. Below that I dragged the marks method for the 2nd class model as a dvt bar graph
    I added a button from the control palette .
    In the button action I am adding the selected ID from the SOC into session variable. The end logic for the graph class is that it will pick the value from the session and based on the ID, it will fetch rows from database and return an array list of ID and marks. and create a graph.
    But the problem i am facing is that, when the first time page loads, it loops through the datamodel for the ID and graph. and creates the page without any graph as no value was there in the session. when I select one ID and hit the submit button, the graph doesnot refresh with the new values.
    Please help me out. I tried googling and read forums but every where it is shown as ADF BC from table and i have not used that.
    Thanx in advance.

  • ADF table refresh on update of database field in the background

    Hi,
    I have an ADF Read Only table based on Toplink mapping for a database table. In my scenario, one of the columns (Name) gets updated in the background (through DB adapter from ESB.
    The problem is the ADF table does not refresh to reflect the updated name, on navigating to other pages and coming back (basically page reload).
    The updated name does not reflect until I logout of the session.
    I have used the explicit refresh option for the "findALL" method used by the ADF table. I have also tried setting "NoIdentityMap" option in Toplink Identity Map.
    Please let me know how can I get the table refreshed. I'm using JDev 10.1.3.1 with Toplink.
    Rgds
    Vikas

    I have same problem, and I tried af:poll . It only works when I insert a new record or delete a new record. It doesn't work when I update records.
    I followed this example from Frank Nimphius
    http://thepeninsulasedge.com/frank_nimphius/2007/09/18/adf-faces-using-afpoll-to-refresh-a-table/
    Plus the selection action is not work at all. (My case is multiple selection).
    I just want to know is it possible using af:poll conponment to autorefresh ADF table when I update a record ?
    JDeveloper 10.1.3.3
    Message was edited by:
    xpp

  • ADF Faces refresh conditions cause NullPointerException

    We are developping an ADF faces web application. For the jspx pages we use EJB3 data controls to display data from the database and other legacy systems.
    Most values in our application are read-only and some take some time to be provided by the database. To increase performance of our web application we decided to change the refresh condition from Refresh="ifNeeded" to Refresh="renderModelIfNeeded". The parameters of the bindings should not change so this seemed to be o.k. for our needs. To avoid the call during postbacks we added RefreshCondition="${!adfFacesContext.postback}".
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="10.1.3.41.57" id="app_pagePageDef"
    Package="web.pageDefs"
    EnableTokenValidation="false">
    <methodIterator id="findSomething"
    Binds="findSomething.result"
    DataControl="GatewayLocal" RangeSize="-1"
    BeanClass="entities.MyObject"
    RefreshCondition="${!adfFacesContext.postback}"
    Refresh="renderModelIfNeeded"/>
    Performance is now really good and all data is displayed.
    On the other hand we now experience a strange behaviour and from time to time we get the following error message:
    07/10/30 14:02:37 java.lang.NullPointerException
    07/10/30 14:02:37 at oracle.jbo.uicli.binding.JUCtrlListBinding.findListIndex(JUCtrlListBinding.java:1096)
    07/10/30 14:02:37 at oracle.jbo.uicli.binding.JUCtrlListBinding.setValueAt(JUCtrlListBinding.java:1726)
    07/10/30 14:02:37 at oracle.jbo.uicli.binding.JUCtrlListBinding.updateValuesFromRow(JUCtrlListBinding.java:1339)
    07/10/30 14:02:37 at oracle.jbo.uicli.binding.JUIteratorBinding.navigated(JUIteratorBinding.java:282)
    07/10/30 14:02:37 at oracle.jbo.common.RowSetHelper.fireNavigationEvent(RowSetHelper.java:261)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.notifyNavigationEvent(DCRowSetIteratorImpl.java:1611)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCGenericRowSetIteratorImpl.notifyNavigationEvent(DCGenericRowSetIteratorImpl.java:313)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.syncIterator(DCRowSetIteratorImpl.java:258)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.first(DCRowSetIteratorImpl.java:653)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:649)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.rangeRefreshed(DCIteratorBinding.java:735)
    07/10/30 14:02:37 at oracle.jbo.common.RowSetHelper.fireRangeRefreshed(RowSetHelper.java:172)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.notifyRangeRefreshed(DCRowSetIteratorImpl.java:1570)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.buildProviderIterator(DCRowSetIteratorImpl.java:465)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.fetchDataSource(DCRowSetIteratorImpl.java:394)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.getRowAtAbsoluteIndex(DCRowSetIteratorImpl.java:1008)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.syncIterator(DCRowSetIteratorImpl.java:225)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.first(DCRowSetIteratorImpl.java:653)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.internalGetCurrentRowInBinding(DCIteratorBinding.java:1919)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.getCurrentRow(DCIteratorBinding.java:1866)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.prepareCurrentRow(DCIteratorBinding.java:548)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:683)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:3499)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCBindingContainer.refreshExecutables(DCBindingContainer.java:2637)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:2568)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2260)
    07/10/30 14:02:37 at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareRender(PageLifecycleImpl.java:534)
    07/10/30 14:02:37 at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareRender(FacesPageLifecycle.java:99)
    07/10/30 14:02:37 at oracle.adf.controller.v2.lifecycle.Lifecycle$1.execute(Lifecycle.java:297)
    07/10/30 14:02:37 at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
    07/10/30 14:02:37 at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.mav$executePhase(ADFPhaseListener.java:29)
    07/10/30 14:02:37 at oracle.adf.controller.faces.lifecycle.ADFPhaseListener$1.before(ADFPhaseListener.java:426)
    07/10/30 14:02:37 at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:77)
    07/10/30 14:02:37 at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:192)
    07/10/30 14:02:37 at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    07/10/30 14:02:37 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    07/10/30 14:02:37 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
    07/10/30 14:02:37 at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
    07/10/30 14:02:37 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
    07/10/30 14:02:37 at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
    07/10/30 14:02:37 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    07/10/30 14:02:37 at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
    07/10/30 14:02:37 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    07/10/30 14:02:37 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:436)
    07/10/30 14:02:37 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    07/10/30 14:02:37 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    07/10/30 14:02:37 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    07/10/30 14:02:37 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    07/10/30 14:02:37 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
    07/10/30 14:02:37 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
    07/10/30 14:02:37 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    07/10/30 14:02:37 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    07/10/30 14:02:37 at java.lang.Thread.run(Thread.java:595)
    Has anyone seen this error before or can anyone explain this error? This problem is mission criticle to us so any help is appreciated. Without the boost of performance and unnecessary callbacks the application is just unusable.
    Thanks in advance,
    Robert

    Hi Frank,
    it seems that this issue is dependent to the renderModelIfNeeded phase. I still have no explanation for this behaviour. For now I've changed our implementation to use the prepareModel phase but I'm still not happy with the ADF phase implementation and documentation. Some methods that we use in the backend are called many times.
    I'll keep on trying to find a solution...
    Thanks
    Robert

Maybe you are looking for

  • QUESTION: How can I locate all instances of a field in mult tables

    Hi all. So im just learning Oracle and I have an interesting question. I just learned how you can query things from multiple tables by using the tablename.fieldname in the select. My question is this. Lets say you have, oh, 100 tables and you have re

  • How to write XSJS Select Query with input parameters

    Hello Experts, I am creating a xsjs file and in that file I am trying to write a Select Query based on a Calculation View I have tried it the following way: var query = 'SELECT TOP 100 \"Name\", \"Address\", \"City\", \"Country\" FROM \"_SYS_BIC\".\"

  • Add an External monitor on T43

    I pluged in an external monitor on my Thinkpad T43 and now the 2 monitors display the same screen. I want to display different screens on the 2 monitors. How to manage this? By the way, I did a clean install of winxp and some neccesary drivers,  so m

  • Record selection issue in same table

    Hi All I have the following table with emp as (            select '11' A,'aaa' B, '40' C from dual union all            select '11','bbb', '40' from dual union all            select '33','ccc', '30' from dual union all            select '44','ddd', '

  • Invoking a UNIX shell command from Java stored procedure

    The program below is suppose do send an email using UNIX mailx program. It works correctly when I compile it in UNIX and invoke it from the command line by sending an email to the given address. I need this program to run as a stored procedure, howev