Howto: Iterate ADF BC from a managed bean from the View?

Hi Everyone,
I've been trying to iterate a BC ADF object from a managed bean from the view layer. Here is what I have done so far, but I don't seem to get any records:
In faces-config.xml, I am passing in the BindingContext to the managed bean. (This is a session scoped bean).
<managed-property>
      <property-name>bindings</property-name>
      <property-class>oracle.adf.model.BindingContext</property-class>
      <value>#{data}</value>
    </managed-property>In the testPageDef.xml I have the executables and bindings setup:
  <executables>
    <iterator id="TestRO1Iterator" RangeSize="-1" Binds="TestRO1"
              DataControl="ApplicationControlDataControl"/>
  </executables>
  <bindings>
    <table id="TestRO1" IterBinding="TestRO1Iterator">
      <AttrNames>
        <Item Value="C1"/>
        <Item Value="C2"/>
      </AttrNames>
    </table>
</bindings>In my managed bean, in addition to the accessors for the bindingContext of bindings, I have:
             BindingContainer bc = getBindings().findBindingContainer("testPageDef");
             ControlBinding cb = bc.getControlBinding("TestRO1");
             RangeBinding rb = (RangeBinding)cb;
             List testList = rb.getRangeSet();
             Iterator testIter = testList.iterator();
             int testCount = testList.size();
             while (testIter.hasNext()) {
               Map attrs = (Map)testIter.next();
               System.out.println(attrs.get("C1")+","+attrs.get("C2"));     
               //Do some fancy stuff here with the values.
             }However, my testList.size() always returns 0.
Is this the right method to programatically access the data from the view layer from a managed bean, or have I missed something completely? Are there any working samples that I could take a look at?
Jdev: 10.1.3.1
Thanks!
Kenton

Hi,
<managed-property>
<property-name>bindings</property-name>
<value>#{bindings}</value>
</managed-property>
private BindingContainer bindings= null;
public void setBindings(BindingContainer bc){
bindings = bc;
public BindingContainer getBindingContainer(){
return bindings;
DCIteratorBinding dciter = (DCIteratorBinding ) bc.get("TestRO1Iterator");
RowSetIterator rsi = dciter.getRowSetIterator();
while (rsi.hasNext()){
Row rw = (Row) rsi.next();
//Do some fancy stuff here with the values.
You find several examples in the developer guide and on the Internet
Frank

Similar Messages

  • ADF Faces: How to get the ADF BindingContainer in a managed bean?

    Hi,
    I not sure how to get the BindingContainer instance from inside of a managed bean method. I have tried the following config, but it does not work in all situations.
      <managed-bean>
        <managed-bean-name>backing_showBooks</managed-bean-name>
        <managed-bean-class>view.backing.ShowBooks</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
        <managed-property>
          <property-name>bindingContainer</property-name>
          <property-class>oracle.adf.model.binding.DCBindingContainer</property-class>
          <value>#{bindings}</value>
        </managed-property>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1showBooks.jsp-->
      </managed-bean>When an ActionListener- method of my ShowBooks bean is called the property bindingContainer is NULL!!
    Is there a save way to get the BindingContainer in my bean??
    Any hints are welcome.
    Thanks,
    Markus

    Maybe I just need another pair of eyes but when I set this up as explained and watch it in the debugger my method public void setBindingContainer(DCBindingContainer bc) gets called but bc is null. Can anyone help?
    Thanks
    Backing Bean-
    private DCBindingContainer bindingContainer;
    public void setBindingContainer(DCBindingContainer bc) {
    this.bindingContainer = bc;
    public DCBindingContainer getBindings() {
    return bindingContainer;
    //I just threw this method on there in case I was missing something & I also
    //tried using a getBindingContainer method above but that didn;t work.
    public void setBindings(DCBindingContainer bindings) {
    this.bindingContainer = bindings;
    adf-faces.conf entry
    <managed-bean>
    <managed-bean-name>backing_VunerabilityDetail</managed-bean-name>
    <managed-bean-class>viewcontroller.backing.VunerabilityDetail</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindingContainer</property-name>
    <property-class>oracle.adf.model.binding.DCBindingContainer</property-class>
    <value>#{bindings}</value>
    </managed-property>
    <!--oracle-jdev-comment:managed-bean-jsp-link:1VunerabilityDetail.jsp-->
    </managed-bean>

  • The Managed Bean in the faces-config.xml File

    I am still very new to JSF. I am confused about the managed bean.
    For example, I have a button in my web page. A click on this button invokes an action; say, ListAction.java.
    In this ListAction class, I instantiate a business delegate; say, ListPersonnel.java and call a method in this business delegate to return an ArrayList: personnel. Of course, this business delegate goes through facade, DAO, etc. to populate the ArrayList. This ArrayList is a collecation of a JavaBean called PersonnelBean that gets and sets a number of personnel information; such as ssn, name, etc.
    Upon this ArrayList is successfully populated and received by the ListAction class, I am going to display a web page with a table. In JSF, it is <h:dataTable ...>.
    My questions are regarding the managed bean in the faces-config.xml file.
    1. Which one is my <managed-bean-class>? packageName.ListAction? or packageName.PersonnelBean? or something else?
    2. What should be my <managed-bean-name>? I guess that I can give a name I like. Is it right? What about xyz?
    3. Then, how do I specify the "value" attribute of my <h:dataTable ...> tag when I display a web page to show the data table? Is it correct to specify value="#{xyz.personnel}"? What is the correct specification if it is wrong?
    4. I guess that I can give any name to the "var" attribute in the <h:dataTable ...> tag. Is it right?

    1. Which one is my <managed-bean-class>?
    packageName.ListAction? or
    packageName.PersonnelBean? or something else?ListAction
    2. What should be my <managed-bean-name>? I guess
    that I can give a name I like. Is it right? What
    about xyz?Anything you like. xyz is OK.
    3. Then, how do I specify the "value" attribute of my
    <h:dataTable ...> tag when I display a web page to
    show the data table? Is it correct to specify
    value="#{xyz.personnel}"? What is the correct
    specification if it is wrong?xyz.personnel is OK assuming that ListAction class has a public
    method getPersonnel() which returns the ArrayList of PersonnellBeans.
    4. I guess that I can give any name to the "var"
    attribute in the <h:dataTable ...> tag. Is it right?Yes, you can give any name you like.

  • HOWTO remove an entry from the node list...

    Hi all,
    does anybody know, howto remove an entry from the node list TAB ?
    I recentyl updated my system to 11.5.10.2 including enabling autoconfig.
    Now, concurrent processes won't start, because of two entries in the node list tab (yes, it's a single node installation!). There are two entries, one with the IP-address and one with the hostname.
    Can somebody tell me howto remove this obsolete entry?
    Thanks.

    1) Login as APPS user to SQL*Plus
    2) Issue the following:
    SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
    SQL> COMMIT;3) Run AutoConfig
    For more details, please refer to:
    Note: 260887.1 - Steps to Clean Nonexistent Nodes or IP Addresses from FND_NODES
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=260887.1

  • How to get the view link definition from the view link accessor

    Hi,
    I am using Jdev 10.1.3 and ADF BC. I am trying to do deep copy in a master/details view, after the new child record is created, I want to update the foreign key attribute. I know I can get the list of attribute definitions from the row in the view object, which include the view link accessors, I am wondering if I can get the view link definition from the view link accessors, so that I can get the source and destination attribute names.
    Thanks!

    Hi,
    you should get this through
    ViewObject vo = this.findViewObject("LocationsView1");
    int indx = vo.getAttributeIndexOf("DepartmentsView");
    ViewAttributeDefImpl vAttrDefImpl = (ViewAttributeDefImpl) vo.getAttributeDef(indx);
    ViewLinkDefImpl vdefImpl = (ViewLinkDefImpl) vAttrDefImpl.findViewLinkDefImpl();
    Note that this code starts from the ApplicationModuleImpl class, which is why I used this.findViewObject().
    Frank

  • How do I move aiff files from the viewer to the timeline-it is not working when I try to drag and click or clicking on overwrite or insert in Final Cut Pro 7. Thanks

    How do I move aiff files from the viewer to the timeline-it is not working when I click and drag or when I try to move the files to the overwrite or insert buttons-Thanks.

    hi
    You cannot move audio from the viewer
    Mark your in and out points then in the browser grab hold of the audio tracks icon and drag that to the time line
    PJ

  • How can i find the option to delete a recent print job from the "View Job History

    1. Photosmart 5510 e-ALL-IN-ONE SERIES
    2. Window 7 64 bit
    How can i find the option to delete a recent print job from the "View Job History

    Hello alfmswongg,
    Currently there is no option to delete print jobs from the "View Job History" section of ePrintCenter.  
    If I have solved your issue, please feel free to provide kudos and make sure you mark this thread as solution provided!
    Although I work for HP, my posts and replies are my own opinion and not those of HP.

  • Why can't I create a response to an email from the Viewer window?

    Why can't I create a response to an email from the Viewer window?
    When I select an email to respond to in the viewer window and click on the respond arrow that appears just under the header, a new response email opens for a split second then disappears.
    I have to actually click on and open the email message in its own screen to be able to then click on the respond arrow and succeed in having Mail open a response email that I can edit - one that remains open.
    This seems to be a bug that we need to have squashed.
    Steve

    Do I have to connect the iPad to a computer to make this work? Is the fact that I used another email address to set up my Apple ID years ago causing the problem? A friend of mine just got a new iPod and he was able to set up a me.com account. I am feeling rather stupid. Hope someone here can help.

  • How to get the Minum Grade level from the view cluster table V_T710CL_B

    Hi Guys,
    I want to fetch the Minum Grade level from the view cluster table V_T710CL_B
    kindly help me
    Regards
    Rusidar.

    HI Siggi,
    Thank you for your reply..
    I am also planning to do FM to get the data. But it is saying that the Cluster table ZES does not exist (ZES is the the standard table, in SE11 also).
    How can I use the Fields from the that table.?
    What can I do now, can you please explain me about this point.
    Waiting for your reply.
    Thanks and Regards
    Rajesh
    Message was edited by:
            rajesh

  • Duplicate date datas (rows) from the view

    Hi friends,
    My purpose is to get the duplicate date datas from the view.
    The following select (1) works well (according to the employee_id). But, the select (2) doesn't work when want to get the duplicate date datas from the view and it gives me an error such as: ORA-00979: not a GROUP BY expression.
    Can you please help... Thanks in advance!
    --- 1 ---
    SELECT   id,
               state,
               insert_timestamp,
               update_timestamp,
               update_status,
               staff_including_date,
               company_name,
               position,
               position_name,
               release_date,
               notes,
               update_user_id,
               employee_id,
               fk_org_structure_id,
               fk_staff_position_id,
               fk_document_id,
               document_date,
               document_number,
               d_order_date,
               fk_activity_operation_type,
               activity_operation_name,
               fk_military_type,
               military_type_name,
               fk_activity_type,
               activity_type_name
        FROM   fhn_staff.v_fs_labor_activity
       WHERE   employee_id = :p_employee_id AND state = 1
    ORDER BY   fk_activity_type, staff_including_date, id;--- 2 ---
    SELECT id,
             state,
             insert_timestamp,
             update_timestamp,
             update_status,
             staff_including_date, COUNT (staff_including_date),
             company_name,
             position,
             position_name,
             release_date,
             notes,
             update_user_id,
             employee_id,
             fk_org_structure_id,
             fk_staff_position_id,
             fk_document_id,
             document_date,
             document_number,
             d_order_date,
             fk_activity_operation_type,
             activity_operation_name,
             fk_military_type,
             military_type_name,
             fk_activity_type,
             activity_type_name
        FROM fhn_staff.v_fs_labor_activity
       WHERE state = 1
    GROUP BY staff_including_date
      HAVING COUNT (staff_including_date) > 1
    ORDER BY fk_activity_type, staff_including_date, id;

    The first four columns? What about the other ones as well.
    If you to fetch a different set of columns than you want to group on, then you should look at an analytic function, i.e
    COUNT(*) OVER (PARTITION BY... )Assuming that you do only want to group by the date (seems a bit odd but I know nothing about what you're trying to do with your data), then it sould be something like this:
    SELECT *
    FROM (
    SELECT id,
             state,
             insert_timestamp,
             update_timestamp,
             update_status,
             staff_including_date, COUNT (*) OVER (PARTITION BY staff_including_date) cnt,
             company_name,
             position,
             position_name,
             release_date,
             notes,
             update_user_id,
             employee_id,
             fk_org_structure_id,
             fk_staff_position_id,
             fk_document_id,
             document_date,
             document_number,
             d_order_date,
             fk_activity_operation_type,
             activity_operation_name,
             fk_military_type,
             military_type_name,
             fk_activity_type,
             activity_type_name
        FROM fhn_staff.v_fs_labor_activity
       WHERE state = 1)
    WHERE cnt  > 1
    ORDER BY fk_activity_type, staff_including_date, id;

  • How can I get FCP to just send the video (without audio) from the viewer?

    Is there a way to select only the video portion of a clip when sending it from the viewer to the timeline? Currently I am taking the whole clip, de-linking the video from audio and then deleting the audio - not exactly the fastest workflow.

    Neil - Thanks for the suggestion but I am a bit more confused now but perhaps I wasn't as clear as I could be either. I am trying to drag clips into the timeline and superimpose them over other clips and I want to be able to drag only the audio or the video from the viewer to the timeline. Is this possible?

  • Why is useful to separate the model from the view in Swing?

    As I have read a few times, swing implements the model-view-controller pattern and I think I understand why to separate the controller from the model and view but not why to separate the model from the view, why is this useful?
    Thanks

    J_MARTINEZ wrote:
    Ok, got it but how can I control the view because for I�ve read in swing you just modify the model in the components. For example, if I have a JProgressBar and I use the method setValue(int) to fill the bar, I am modifying the proeperty value in the model but I dont have control for the view.I'm not sure I know what you mean here. If you change the model, the view will automatically update itself and display the changed value. You should have a look at some of Swing's source code such as AbstractButton and DefaultButtonModel. There you'll see that the view adds (I think, it's been a bit since I looked myself) a ChangeListener to the Model that the model uses to notify the view of any changes.

  • How to get the menu bar back after turned off all toolbars from the "View" menu

    Do this: turn OFF all toolbar view from the view menu, with the Menu toolbar the last one.
    Problem: cannot find any UI to turn it back, stuck with a bare window, except the tab list.
    == This happened ==
    Every time Firefox opened
    == turn OFF all toolbar view from the view menu, with the Menu toolbar the last one.

    Press the Alt key, this temporarily brings up the menu bar. You an then use the View menu to re-select the menu bar.

  • Anyone know why, firefox does not remember password for a site when you remove password from the view password site? I removed a pasword in the view password window and now it not asking me to remember and also it is not remembering the password when I go

    Anyone know why, firefox does not remember password for a site when you remove password from the view password site? I removed a password for a site that was not remembering the correct password for the "view password" window and now it does not guess the password and does not remember the password for that site. All other sites are being remembered.
    == This happened ==
    Every time Firefox opened
    == After I deleted the password from the view password window.

    The saved password feature worked well, but the site I had saved the password for required that I change the password. I have found no way to update the password in Firefox. After I deleted the saved password, Firefox did not ask if I wanted the new password saved. When this happened before, I removed and re-installed Firefox, and then it worked. I hope there is another way to update a password.

  • Hello. I appreciate your help. I am in FCP7 and trying to do Boris Vector Shape effect. When I try to pull the  vector shape square from the view window to the Superimpose, I get the message: insufficient content for edit. Why?

    Hello. I appreciate your help. I am in FCP7 and trying to do Boris Vector Shape effect. When I try to pull the  vector shape square from the view window to the Superimpose, I get the message: insufficient content for edit. Why? I did this effect before and everything worked well. Thank you for your help.

    Make sure that you have no active I/O markers on the Timeline (use Option X keys to clear them).

Maybe you are looking for

  • Did the regular 15" MBP receive the upgraded fans?

    OK, we all know that the regular 13" and 15" MBP's were upadted and are just as capable, acually other than the display they are more capable and more flexible machines than the Retina MBP.  The only thing that hasn't been talked about anywhere is th

  • Problem with CTX_DOC package and Ubuntu 12.04

    I have installed Oracle 11gR2 on Ubuntu 12.04 and also Oracle 12c on another Ubuntu 12.04. I know that this is not a supported distribution, but we have a case where it's necessary to have Ubuntu. Following some instructions, that we have read in som

  • Changing value in JcomboBox

    hi, i am new learner in java programming language. i trying to develop a Greenwich inn resort reservation system. i am adding 2 JCombobox in the JFrame and adding 2 Action listener to the 2 created JCombobox in oder to reset the value in Jcombobox. j

  • Filter value on hierarchy node in Business Explorer Analyser

    Hi experts, I'm facing an issue in BI 70 SP 10. I'm using Business Explorer release 3500.11.051. In a query, when I set a filter value on a hierarchy node, all the hierarchy is available and i can choose my node. Now, i want to change of filter value

  • Help with build.xml

    I have this target in my build.xml      <target name="clean">           <property name="classesFolder" value="WebContent\WEB-INF\classes"/>           <delete dir="${classesFolder}"/>      </target>The other targer      <target name="compileSource">