ADF SelectOneChoice Refresh

Hi all,
I want to know how to refresh a combobox (id=c2) and syncronize it with databindings.
When i change the value of my other combo (id=c1) (with autosubmit=true) i have in my bean this to try to refresh my combo (id=c2)
BindingContainer bindings = getBindings();
OperationBinding operationBinding =
bindings.getOperationBinding("ExecuteWithParams"); //over viewobject that is used by c2
Object result = operationBinding.execute();
AdfFacesContext adfContext = AdfFacesContext.getCurrentInstance();
adfContext.addPartialTarget(c2);
I also have in my pagedef this
<invokeAction id="invokeCombo2" Binds="ExecuteWithParams"
Refresh="always"/>
The thing is that combo data is filtred and it looks like as i wish ....
but i realize the data is out of sync with my values.
Imagine that i have in my c2 this pairs value/text:
value1/text1
value2/text2
If my combo c1 filters c2 to just show text2 what happens is that text2 cames with value1. wrongly.
What is not syncronizing?

I went thru the same issue about 2 months ago.
Short version is if your calling this in the backing bean then the value you are using the previous value of c1. You don't need to do this if you have the partialTriggers property of c2 set to c1. It will automatically refresh c2. But there's a catch if the value of c1 is not sequential 0,1,2,3,4... then you need to place the field used by c1 on the page again and set the renderd propert to false (usually will gets the name <field_name>1). Now in your ExecuteWithParms set the param value to <field_name>1. This is because if you look at the values returned by the SelectOneChoice it's the index value (0,1,2,3..) not the actual value.
For more deatil on this you can look at a blog by Duncan Mills
http://www.groundside.com/blog/content/DuncanMills/J2EE+Development/2006/03/22/ADF-The-List-Binding-Value-Problem.html?page=comments
I hope this helps

Similar Messages

  • VO LOV (and af:selectOneChoice) refresh. Can it be automatic?

    Hi!
    I'm using the build: JDEVADF_11.1.2.2.0_GENERIC_120418.2212.6183.1
    I defined an attribute in a ViewObject to use a LOV.
    When the page which uses the such attribute is loaded the current database records/information are loaded with no problem.
    But if there is some change in the data from where the LOV comes, it does not reflect in the items available (neither if the underlying record was deleted/inserted/updated). No matter what I do: reload the page, navigate to other and come back and so forth, the only way to refresh the combo box is starting a new session.
    Looking at the pagedef I could not find the iterator used to build the list of items in the combo box, but while debugging the page I could find a iterator (in fact a JUIteratorBinding) that had the name of the underlying view (from where the items to populate the combo box come) and an additional "List_XX" in the end of the name where XX is a number that varies with no apparent logic sometimes is 2, sometimes is 13, sometimes is 87 and so forth. So I guessed ADF generates it automatically.
    I wrote a small function linked to a button and called from there the iterator refresh method.
    Once this was done the refresh is processed and everything looks fine for all operations in the underlying data (insert/update/delete).
    While I found a partial solution, it looks too much complicated.
    What I mean is: Do we need to have all this amount of work to get a simple combo box refreshed?
    Is there any approach that is simpler?
    I can't believe that a framework like ADF don't have an easier way to solve this use case, but I read the documentation and searched a lot this forum and found no solution, although many posts helped me in building this "solution" (did I miss something?).

    Duplicate af:selectOneChoice refresh problem

  • ADF selectonechoice valuebinding called twice

    Does anyone have any idea why the valuebinding method of an ADF SelectOneChoice component would be called twice? I have one drop down with values and when I select something in that drop down the valuebinding for the second drop down is called twice, when it should only be called once. Any help would be appreciated.

    Hi,
    what is the refresh setting of the region binding in the page's PageDef file? Put a print statement to the task flow initializer to verify the region is executed twice
    Frank

  • Bind the output data (Xml) from BPEL process to ADF SelectOneChoice Control

    Hello,
    My requirement is to invoke a BPEL process from ADF page and display returned results in a select one choice (drop down box).
    I have created a Data Control for the BPEL process through Web service data control and tried to invoke the BPEL process. I could see from the BPEL console that BPEL process is getting invoked. But the ADF doesn't bind any of the output to Select one choice.
    It doesn't even show any error.
    Can you plz help me how to bind the output of the BPEL process to ADF SelectOneChoice control.
    The Xml Which I recieve from BPEL process is
    <outputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload"><DBConnectDemoProcessResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/DBConnectDemo">
    <StatusTrans xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelect">
    <transId>1</transId>
    <fromStatus>Open</fromStatus>
    <toStatus>Assigned</toStatus>
    </StatusTrans>
    <StatusTrans xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelect">
    <transId>2</transId>
    <fromStatus>Open</fromStatus>
    <toStatus>Pending</toStatus>
    </StatusTrans>
    <StatusTrans xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelect">
    <transId>3</transId>
    <fromStatus>Open</fromStatus>
    <toStatus>Closed</toStatus>
    </StatusTrans>
    <StatusTrans xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelect">
    <transId>4</transId>
    <fromStatus>Open</fromStatus>
    <toStatus>Cancelled</toStatus>
    </StatusTrans>
    </DBConnectDemoProcessResponse>
    </part></outputVariable>
    And the toStatus node values viz, Assigned, Pending, Closed, Cancelled should get binded to the SelectOneChoice control
    Waiting for your valuable inputs,
    Regards,
    babloo.

    I have been still trying for the solution. I have modified the XSD created by the jdeveloper to,
    <schema attributeFormDefault="unqualified"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/StateTransitions"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <element name="StateTransitionsProcessRequest">
              <complexType>
                   <sequence>
                   <element name="input" type="string"/>
                   </sequence>
              </complexType>
         </element>
         <element name="StateTransitionsProcessResponse">
              <complexType>
                   <sequence maxOccurs="unbounded">
    <element name="stateChanges">
    <complexType>
    <sequence>
    <element name="fromState" type="string" />
    <element name="toState" type = "string" />
    </sequence>
    </complexType>
    </element>
    </sequence>
              </complexType>
         </element>
    </schema>
    And I have given this XSD url while creating the Web Service Data Control by deploying it into the Oracle App server.
    So, I can see the tree structure of "Return" as "StateTransitionsProcessResponse->StateChanges->toState,fromState"
    I have binded the toState field of the Data Control to the SelectOneChoice ADF control in a jspx page by using List binding editor.
    I have selected,
    Base data source as "Variables" (Currently I don't need to update any table),
    List Data source as "process: getStateTransitions.process.StateTransitionsProcessResponse.stateChanges" (Web Service Data Control)
    Base Data source attribute as "process_input"
    List Data Source Attribute as "toState"
    I can initiate the web service (BPEL process) by providing the necessary input value like 'Open' or 'Pending' or 'Assigned' but the SelectOneChoice control doesn't populate with any values.
    Waiting for valuable inputs!
    Thanks and Regards,
    babloo.

  • 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 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 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 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.

  • 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 selectOneChoice filtering - Oracle ADF mystics

    Hi clever guys,
    I wanna filter a selectOneChoice component based on the value of another component using JUCtrlListBinding.filterList(..) in the managed bean (onValueChange)
    based on Frank Nimphius' article
    [http://www.oracle.com/technetwork/developer-tools/adf/learnmore/90-filter-adf-bound-lists-508190.pdf]
    Say my selectOneChoice contains 10 rows with different pointId attribute - POINTA, POINTB, POINTC.
    If we filter on pointID, which is contained only in 1 row, then the filter returns all the rows - filtering is not applied. As soon as a specific pointID is contained at least in 2 rows, the filtering works and only these rows are returned.
    Say we display selectOneChoice with attributes productId and pointId. Rows, before filtering, are like this
    - PRODUCT1, POINTB,
    - PRODUCT2, POINTA,
    - PRODUCT3, POINTB,
    - PRODUCT4, POINTC,
    - PRODUCT5, POINTC,
    - PRODUCT6, POINTB,
    - PRODUCT7, POINTC,
    If we tell JUCtrlListBinding.filterList() to select only rows with POINTB or POINTC, it works fine (returns 2 resp. 3 rows), because they are contained in 2 or 3 rows. If I filter on POINTA, all rows (7) are returned (filtering is not applied). As soon as I insert 1 more row for POINTA, it works.
    My code snippet>
    JUCtrlListBinding listBinding = (JUCtrlListBinding) bindings.get("productId1");
    listBinding.getDCIteratorBinding().getViewCriteria().clear();
    HashMap m = new HashMap();
    m.put("pointId", selectedPointId);
    listBinding.filterList(m);
    I write out the contents of listBinding values with System.out... just before and just after the filterList method, that's how I can see that this method behaves like that.
    Guys, do you have any idea on what could go wrong and how to workaround it?
    Thanks a lot.
    Using JDeveloper 11.1.1.3.0

    Thanks for the quick response!
    Using the department / employee example... I'm trying to create a form that allows a user to create a new department. I have dragged the "Department" object (located under queryDepartmentFindAll()) over to my jspx form. A form with corresponding fields is created.
    I notice that no field was created for employeeId. I expand the "Department" object (again, under queryDepartmentFindAll()) and observe that "Employee" is present, as a list (expanding Employee provides access to employee object attributes along with another list entitled departmentList).
    I know that it's unlikely that only one employee would be selected in the creation of a department... but I'm sticking to the example...
    So, I drag the "Employee" (again, under queryDepartmentFindAll()) object over to the newly created form and from the pop-up menu I choose selectOneChoice as the desired component. I run the jspx page, Internet Explorer 7 browser pops up and all labels display on the page, all fields but no selectOneChoice component appears on the screen... the space is there for it but it appears to be invisible. I have checked the Employee table and there is data to be displayed... it's just that I must be missing something...

  • 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 selectOneChoice and af:forEach

    Hi,
    I'm atempting to create a data-bound selectOneChoice that displays DepartmentName and selects the corresponding DepartmentId as its value. I've tried using an af:forEach on an f:selectItem with the selectOneChoice, but I'm getting an error with the EL refernces that the the row refernces aren't valid.
    Could anyone provide some insight?
    Thanks,
    Debojit

    Thanks for the prompt reponses.
    Hi Suresh, Rodrigues and Vinod,
    I'm attempting to build my selectOneChoice from the Department table table directly, without code in between AND get back real values for the selections I make, so I'm afraid I can't use any beans, at least not for pouplating the drop-down list.
    Hi Navaneetha,
    I tried your approach, but I'm still getting a "Refrence not Found" error for the EL refernce "#{row.DepartmentName}" , and the drop down is coming up as empty when i run the page.
    Here's the code for the page and the corresponding page def.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:selectOneChoice label="Departments" id="soc1">
    <af:forEach items="#{bindings.DepartmentsView.items}" var="row">
    <af:selectItem label="#{row.DepartmentName}" id="si1"
    value="#{row.DepartmentId}"/>
    </af:forEach>
    </af:selectOneChoice>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="11.1.1.60.13" id="DepartmentsViewPageDef"
    Package="view.pageDefs">
    <parameters/>
    <executables>
    <variableIterator id="variables"/>
    <iterator Binds="DepartmentsView" RangeSize="10"
    DataControl="HrAppModuleDataControl"
    id="DepartmentsViewIterator"/>
    </executables>
    <bindings>
    <tree IterBinding="DepartmentsViewIterator" id="DepartmentsView">
    <nodeDefinition DefName="model.views.DepartmentsView"
    Name="DepartmentsView0">
    <AttrNames>
    <Item Value="DepartmentId"/>
    <Item Value="DepartmentName"/>
    </AttrNames>
    </nodeDefinition>
    </tree>
    </bindings>
    </pageDefinition>

  • 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

  • Problem in creation of SOAP massage

    hi I am using JDeveloper (version 11.0) to create the proxy classes from WSDL but i am getting an exception as following SOAPFaultException this exception indicate that there is some problem in creation of SOAP massage internally so can anyone help m

  • Call static method of Acrobat from C#

    I have a C++ static function and I want to invoke that function from C# code (it's a button_click event). I tried to export that function by creating it's DLL, but it doesn't work out. My C++ function looks like this: static ACCB1 void ACCB2 Highligh

  • MIME type of attachments in CRM

    Hi there, could you please assist with the following question. There is an attachment in CRM system which is stored with MIME text/x-doctype - can the MIME type be changed afterwards somehow? Maybe using some report? thanks for your help! cheers, Joh

  • How can we call windows application inside the bsp ...

    hi, i just want to call the exe file or execute or open outlook express inside a page... or.. openeing a notepad.. thanks jaideep

  • ST03, cube statistics in NW4s

    Hi all, Could someone tell me which statistics cube(s) has to be filled in order to get data displayed in ST03, workload BW, Reporting - InfoCubes: Share of total time(s) (first screen)? Thanks, Nathalie