Access programmatically view accessor

hello,haw can i access programmatically view accessor of LOV in backing bean.

Which jdev version do you use?
What is your use case?
What kind of LOV are you talking about?
Timo

Similar Messages

  • How to access View Accessor in VOImpl

    Hi
    In our application we have two View Objects say VO1 and VO2
    Now VO1 has a view accessor as VO2.
    VO1 is a View object with programmatically populated rows that i want to populate by executing VO2 in VOimpl of VO1.
    How can i access VO2 in VO1.impl file.
    Thanks
    AJ

    Hi,
    have you provided view link for both vo..?
    if yes then there is no need to manually add child vo as accessor, because in that case in accessor the vl doesnot gets applied..
    remove it from accessor list
    open vl, goto relation ship, edit accessors, make sure in destination accessor 'In view object' is checked, note the name of accessor for example take it as 'childvo' keeping it default is better.
    so in row of parent viewobject you can access the child view rows as following
    1-* relationship
    Row row = getCurrentRow();
    ViewRowSetImpl vrs = (ViewRowSetImpl) row.getAttribute("childvo");1-1 relationship
    Row row = getCurrentRow();
    ViewRow vrs = (ViewRow) row.getAttribute("childvo");Regards,
    Edited by: Santosh Vaza on Jun 4, 2012 4:49 PM

  • Multiple view accessor in entity displaying wrong

    In an entity.xml file I need to define several view accessors to use for List Validation.
    However, when I add more than one view access to the entity and go to define the List Validator for the attribute (this dialog box is called "Add Validation Rule for: Attribute"), the display is all screwed up; the view accessor names are overlapped or some are missing.
    Does anyone know how to fix this or can recommend a resonable work-around.
    Thank you.

    Hi,
    Detail Rule, copy attribute value form master.
    In DetailEOImpl:
    protected void create(AttributeList attributeList)
    setAttribute(MASTERFIELD,this.getMaster().getMasterField());
    super.create(attributeList);
    Master rule, set flag to 0 if no details else set to 1.
    In the MasterEOImpl added method to check if detail row exists based on Row Iterator => no db retrieval?
    This method also sets the flag accordingly:
    protected void checkHasOtherDetails()
    oracle.jbo.RowIterator ri = this.getRetrieveFromdetail();
    ri.last();
    // last() must be called else hasNext() returns true even on last delete ???
    Number hasDetails = Constants.NUMBER_NO; // = 1
    if (ri.hasNext() || ri.hasPrevious())
    hasDetails = Constants.NUMBER_YES; // = 0
    if (!getHasDetailsFlag().equals(hasDetails)) {
    this.setHasDetailsFlag(hasDetails);
    I call this method in the remove method of the detailEOImpl:
    public void remove()
    this.getRetrieeFromMaster().checkHasOtherDetails();
    super.remove();
    To set the flag I added follwoing code in the create method of the DetailEOImpl:
    protected void create(AttributeList attributeList)
    setAttribute(MASTERFIELD,this.getMaster().getMasterField());
    **** ADDED ***
    Number masterHasDetailsFlag = getRetrieveFromMaster().getHasDetailsFlag();
    if (!masterHasDetailsFlag.equals(Constants.NUMBER_YES)) {
    getRetrieveFromMaster().setHasDetailsFlag(Constants.NUMBER_YES));
    super.create(attributeList);
    One more question:
    Is there a danger of calling last() on row iterators in create/update/remove methods of *Impl files?
    => current row changed => any effect on display in JPanel
    Thanks
    Frederic
    PS All variable/method/class names have been manually renamed in this code so some small syntax problems may exist.

  • View Accessors: Why are they important?

    Hi,
    I have a couple of questions below. please help me in getting them.
    1. What View accessors are actually meant for? From the documentation at http://docs.oracle.com/cd/E17904_01/web.1111/b31974/bclookups.htm#CIHCHGIA, although its clear that it accesses all the rows from the other View objects, so are View accessors meant only for accessing such data, from different view object.
    2. Are view accessors also meant to access rows from two or more view objects?
    Thanks,
    Edited by: pandurang_sp on Jun 10, 2012 10:39 PM

    - View Accessors by definition are ADF Business Components object that points from an entity object attribute (or view object) to a destination view object or shared view instance in the same application workspace. The view accessor returns a row set that by default contains all the rows from the destination view object.
    - The source and destination view objects are generally associated in some way so you can retrieve the row set from destination based on source row selection.
    - And yes the accessors can access rows from multiple view objects.
    - E.g. consider an Dept/Emp case where EmpVO is set as accessor for DeptVO where DeptID=EmpVO.DeptID. For a given dept you can quickly access all employees using this accessor.

  • Programmatic View Objects + View Links

    Ive constructed some programmatic view objects to grab data from 2 custom java business services (for example: Persons and Addresses). The reasons for them being custom and separate are out of my control.
    I need to easily represent a relationship between these 2 view objects so Ive constructed a ViewLink between them. However I cant figure out exactly what ADF needs from me in terms of method implementations in my ViewObjects?
    When I drop the master data control onto a JSF via a Tree table, it looks as though its not actually filtering the detail rows. I.e. if master is a Person, and detail objects are Addresses, each Person tree node has all Addresses under it. Im assuming this is because the Address ViewObject is programmatic and so ADF doesn't know how to filter the results?
    How can I setup this ViewLink between 2 programmatic ViewObjects such that the ViewLink works like its supposed to?

    Hello,
    Steve Muench´s sample 132 implements what you are trying to accomplish. Inspect the sample and let us know if you have questions about it.
    http://blogs.oracle.com/smuenchadf/resource/examples#132
    Juan C.

  • View Link on two programmatic view objects

    Hello,
    I use Build JDEVADF_11.1.1.1.0_GENERIC_090615.0017.5407
    I have two programmatic View Objects with data from other sources (an ArrayList in my example).
    Now I would like to create a View Link on it. How can I do this?
    I'm quite new on Java and ADF...
    I know it is possible because I already found Steve's example 132 here [http://blogs.oracle.com/smuenchadf/examples/|http://blogs.oracle.com/smuenchadf/examples/]
    But could somebody create a simple example based on my example classes below (which is understandable for a newbie like me ;-) ?
    Has been asked already here, but I did not found a solution as yet.
    Error with view link and ADF table Tree
    This is my example code for the view objects:
    Employee.java:
    private Number empno;
    private String ename;
    private Number dept;
    with getters and setters...
    Department.java
    private Number deptno;
    private String dname;
    with getters and setters...
    public class StaticDataDepartmentsImpl extends ViewObjectImpl {
    int rows = -1;
    private List<Department> departments = new ArrayList<Department>();
    protected void executeQueryForCollection(Object rowset, Object[] params,
    int noUserParams) {
    // Initialize our fetch position for the query collection
    setFetchPos(rowset, 0);
    super.executeQueryForCollection(rowset, params, noUserParams);
    // Help the hasNext() method know if there are more rows to fetch or not
    protected boolean hasNextForCollection(Object rowset) {
    return getFetchPos(rowset) < rows;
    // Create and populate the "next" row in the rowset when needed
    protected ViewRowImpl createRowFromResultSet(Object rowset,ResultSet rs) {
    ViewRowImpl r = createNewRowForCollection(rowset);
    int pos = getFetchPos(rowset);
    populateAttributeForRow(r, 0, departments.get(pos).getDeptno());
    populateAttributeForRow(r, 1, departments.get(pos).getDname());
    setFetchPos(rowset, pos + 1);
    return r;
    // When created, initialize static data and remove trace of any SQL query
    protected void create() {
    super.create();
    // Setup string arrays of codes and values from VO custom properties
    initializeStaticData();
    rows = (departments != null) ? departments.size() : 0;
    // Wipe out all traces of a query for this VO
    getViewDef().setQuery(null);
    getViewDef().setSelectClause(null);
    setQuery(null);
    // Return the estimatedRowCount of the collection
    public long getQueryHitCount(ViewRowSetImpl viewRowSet) {
    return rows;
    // Subclasses override this to initialize their static data
    protected void initializeStaticData() {
    Department d1 = new Department();
    d1.setDeptno(new Number(10));
    d1.setDname("IT");
    Department d2 = new Department();
    d2.setDeptno(new Number(20));
    d2.setDname("HR");
    departments.add(d1);
    departments.add(d2);
    // Store the current fetch position in the user data context
    private void setFetchPos(Object rowset, int pos) {
    if (pos == rows) {
    setFetchCompleteForCollection(rowset, true);
    setUserDataForCollection(rowset, new Integer(pos));
    // Get the current fetch position from the user data context
    private int getFetchPos(Object rowset) {
    return ((Integer)getUserDataForCollection(rowset)).intValue();
    public class StaticDataEmployeesImpl extends ViewObjectImpl {
    int rows = -1;
    private List<Employee> employees = new ArrayList<Employee>();
    protected void executeQueryForCollection(Object rowset, Object[] params,
    int noUserParams) {
    // Initialize our fetch position for the query collection
    setFetchPos(rowset, 0);
    System.out.println("in executeQueryForCollection");
    super.executeQueryForCollection(rowset, params, noUserParams);
    // Help the hasNext() method know if there are more rows to fetch or not
    protected boolean hasNextForCollection(Object rowset) {
    System.out.println("in hasNextForCollection. Rows:" + rows);
    return getFetchPos(rowset) < rows;
    // Create and populate the "next" row in the rowset when needed
    protected ViewRowImpl createRowFromResultSet(Object rowset,ResultSet rs) {
    ViewRowImpl r = createNewRowForCollection(rowset);
    int pos = getFetchPos(rowset);
    System.out.println("in createRowFromResultSet. Pos=" + pos);
    populateAttributeForRow(r, 0, employees.get(pos).getEmpno());
    populateAttributeForRow(r, 1, employees.get(pos).getEname());
    populateAttributeForRow(r, 2, employees.get(pos).getDept());
    setFetchPos(rowset, pos + 1);
    return r;
    // When created, initialize static data and remove trace of any SQL query
    protected void create() {
    super.create();
    // Setup string arrays of codes and values from VO custom properties
    initializeStaticData();
    rows = (employees != null) ? employees.size() : 0;
    System.out.println("in create(). Rows=" + rows);
    // Wipe out all traces of a query for this VO
    getViewDef().setQuery(null);
    getViewDef().setSelectClause(null);
    setQuery(null);
    // Return the estimatedRowCount of the collection
    public long getQueryHitCount(ViewRowSetImpl viewRowSet) {
    return rows;
    // Subclasses override this to initialize their static data
    protected void initializeStaticData() {
    Employee e1 = new Employee();
    e1.setEmpno(new Number(2333));
    e1.setEname("Emp1");
    e1.setDept(new Number(10));
    Employee e2 = new Employee();
    e2.setEmpno(new Number(1199));
    e2.setEname("Emp2");
    e2.setDept(new Number(20));
    Employee e3 = new Employee();
    e3.setEmpno(new Number(3433));
    e3.setEname("Emp3");
    e3.setDept(new Number(10));
    Employee e4 = new Employee();
    e4.setEmpno(new Number(5599));
    e4.setEname("Emp4");
    e4.setDept(new Number(20));
    Employee e5 = new Employee();
    e5.setEmpno(new Number(5676));
    e5.setEname("Emp5");
    e5.setDept(new Number(10));
    Employee e6 = new Employee();
    e6.setEmpno(new Number(7867));
    e6.setEname("Emp6");
    e6.setDept(new Number(20));
    employees.add(e1);
    employees.add(e2);
    employees.add(e3);
    employees.add(e4);
    employees.add(e5);
    employees.add(e6);
    // Store the current fetch position in the user data context
    private void setFetchPos(Object rowset, int pos) {
    if (pos == rows) {
    setFetchCompleteForCollection(rowset, true);
    setUserDataForCollection(rowset, new Integer(pos));
    // Get the current fetch position from the user data context
    private int getFetchPos(Object rowset) {
    return ((Integer)getUserDataForCollection(rowset)).intValue();
    Who can help?
    Thnx in advance!
    Rolf

    Rolf,
    I guess when we try to do it for you, we end up with almost the sample code provided by Steve Muench.
    So there from my point of view it doesn't make sense to do it all over.
    Take some time and study the sample code, run it without changes and after that try some changes which suits your use case better.
    If you don't understand what's going on in the sample post the question here and we try to help you.
    Timo

  • View Links for Programmatic View Objects

    Hi All,
    I created a read only VO called MyVO based on a sql query.
    I created 2 programmatic view objects, MasterView and ChildView.
    In a custom method in AMImpl class ,I iterate through this MyVO resultset and get the rows in a Row object.
    Based on some attributes values of the Row, I populate both master and child View Objects.
    I have created a view link between Master and Child Programmatic View Objects and have exposed them in AM.
    Now I run the AM, and run the method exposed in client interface.
    Now I click on my master and child programmatic views.
    I see that the rows are populated in both of these programmatic VOs.
    But when I click on viewlink which I have exposed under master, it doesnt show me any
    record for child.
    This is my method of AMImpl which is exposed in AM client interface.
    public void constructLines(){
    ViewObject vo= this.getMyVO1();
    ViewObject master=this.getTransientVO1();
    ViewObject child=this.getTransientLineVO1();
    Row r,masterRow,childRow;
    int count=0;
    while(vo.hasNext()){
    ++count;
    r=vo.next();
    masterRow = master.createRow();
    if(r.getAttribute("QuoteHeaderId")!=null)
    masterRow.setAttribute("QuoteHeaderId",
    r.getAttribute("QuoteHeaderId").toString());
    if(r.getAttribute("QuoteLineId")!=null)
    masterRow.setAttribute("QuoteLineId",
    r.getAttribute("QuoteLineId").toString());
    if(r.getAttribute("LineNumber")!=null)
    masterRow.setAttribute("LineNumber",
    r.getAttribute("LineNumber").toString());
    master.insertRow(masterRow);
    childRow= child.createRow();
    if(r.getAttribute("RefLineId")!=null)
    childRow.setAttribute("RefLineId",
    r.getAttribute("QuoteLineId").toString());
    if(r.getAttribute("QuoteHeaderId")!=null)
    childRow.setAttribute("QuoteHeaderId",
    r.getAttribute("QuoteHeaderId").toString());
    child.insertRow(childRow);
    This is stopping me from my development progress.
    Any suggestion to solve this will be of great help.
    Thanks,
    Prabhanjan

    Hi..
    have you define relationship correctly between masterVO and childVO.sometime there may be the problem.

  • Changing a Programmatic View Object's query at run-time

    Hi,
    I've created a programmatic View Object using the information in '35.9.3 Key Framework Methods to Override for Programmatic View Objects' in the Oracle Middleware Fusion Guide and bound it to a BarChart. This has worked fine using the following:
    String myColumn = "Quant1";
    protected void create() {
    getViewDef().setQuery(null);
    getViewDef().setSelectClause(null);
    setQuery(null);
    String myQuery = "SELECT Service as MyService, " + myColumn + " as MyValue FROM ColumnTestTable WHERE 1 = 1";
    getViewDef().setQuery(myQuery);
    setQuery(myQuery);
    I also have my data updating automatically. I have public properties in my viewObjImpl class which I can set and update the value of myColumn. I then thought it would just be a case of re-calling the create() method and the SQL would be updated and my chart would auto-update using the new column to select it's values, the value of the property updates and the create method is called but the chart doesn't display any different data and stops auto-updating. Does anybody know if this is possible and if so what I may have missed?
    Cheers, Tom

    Hi Timo,
    I moved everything to a different public method and solved the problem by firing the execute() method which I hadn't been doing previously and the chart updates with the correct data.
    However, once I execute the SQL my chart stops auto-updating with changes to the data in the database - do you know how I update the SQL query but keep my chart auto-updating? Perhaps I have to re-register for the registerDatabaseChangeListener for the query collection?
    Thanks in advance, Tom

  • Populate Programmatic View Objet at runtime

    Hi All,
    I have a requirement to switch between three different data source at runtime in one page. The UI and field names are the same for those three cases but data is coming from different sources (queries).
    So, imagine that we have 3 view objects that implemented as read only (query based view object) and we want to populate one view object at runtime as a main data source for my page.
    My idea is to use "Prgorammatic View Object" for that main data source and then dynamically populate its content from one of the three read-only view objects based on a parameter provided by user selection.
    First of all, I want to know whether this is fine approach and if so, then get some points about implementation or any other sample.
    I have found this sample:
    http://techiecook.wordpress.com/2011/05/17/programmatically-populate-view-objects-in-oracle-adf/
    Thanks in advance,
    Nasser

    Hi,
    this more is a use case for adaptive bindings. See:https://blogs.oracle.com/groundside/entry/towards_ultra_reusability_for_adf
    You can use EL to change the ViewObject name an iterator in ADF queries its data from. So the switch would be on the binding layer and there is no need for programmatic view objects. Unlike in the above blog article, the 3 VO exist in your case so you don't need to create them on the fly. Just change the VO name in the referenced managed bean
    Frank

  • How can i access two view in a method

    hi i have a situation where i have to access two view in one method how can i do that am in jdeveloper 11.1.2.1.0
    Edited by: Tshifhiwa on 2012/07/03 4:33 PM

    Hi ,
    ViewObject svo = this.findViewObject("AGR1");
                        ViewObject svo1 = this.findViewObject("AFUN");
                        svo.executeQuery();
                        svo1.executeQuery();
                        Row row = svo.first();
                        Row row1= svo1.first();This is correct .But can you let us know where you are getting java null pointer exception.Moreover again can you check the VO name which you are looking here is available in AM or not.and also check the AM object as well .It should not be null
    Thanks
    Prateek

  • How to Access Maintenance View from a program

    Hi Experts,
    I have created a maintenance view for a table. i want to insert data's into the table through the maintenance view. I don't know how to access the view, how to insert data into the Maintenance view. Please suggest me how to access the view from the program.
    with regards,
    James...
    Valuable answers will be rewarded...

    Hi,
    What is the need to search for a program.
    Use transaction SM30 or SE16 to create or maintain entries in the table.
    e.g. if the Maintenance view is created on table A, then Goto transaction SM30 or SE16 and give the table name as A and proceed. This will automatically take u to the maintenance view on tha table A.
    Regards,
    Himanshu

  • Error received while accessing a view made

    HI,
    I have made a view and registered it to the application.
    But in application, when i access the view , it gives the following error
    We detected an Error which may have occurred for one or more of the following reasons:
    Could not find 'Applet' named 'Account_ListApp_CDS'. This object is inactive or nonexistent.(SBL-DAT-00144)
    Kindly help

    Have you compiled the Applet into the SRF?
    Just to be sure, check in the Applet (if not already done) and do a full compile.
    Replace the SRF and see what happens.

  • Refresh problem by combination of programmatic view and master-detail page

    I am using the latest versions of both ADF (10.1.3.2.0.4066) and JHeadstart (10.1.3.1.26) and I have an application with 1 page in which I have as root page a programmatic view (table-form) which I fill with request parameters.
    Under that programmatic view I have a master (table) with 3 detail pages (table).
    The programmatic view is populated with always 1 row, which goes always correct.
    The problem is occuring when iterating through the first entity based master table which contains lots of rows. Then the problem is that when you navigate through the master table the detail pages are refreshed correctly, but when you navigate back to the first row that row won't get updated.
    The next thing I tried is create a new jheadstart application with only the master-detail pages (entity based), so without the programmatic view, and then the iterating through the master table and the refresh of the child tables is working correct.
    What can be the problem here.

    Have you tested this in the ADF Business Components Browser? That's the tester that you can find by right-clicking your ADF BC Application Module and choosing Test. If you go to the View Object instance for the programmatic view, and using the ViewLinks to its children, do you get the same behavior as in the JHeadstart application?
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Access a view on a 32 bit Oracle 9i  from a MS SQL 2008 R2 64 bit

    NOt sure if this is the right forum for this.
    We need to access a view on a 32 bit Oracle 9i - Release 9.2.0.8.0 database running on Windows 2003 Server, from a MS SQL 2008 R2 64 bit system running on Windows Server 2008 64 bit.
    Edited by: 854859 on Apr 26, 2011 3:21 PM

    When yu want to access a view hosted in Oracle and retrieve data from this view in a MS SQl Server, then you need to use MS SQL Server Linked Server mechanism based on OLEDB/ODBC.
    Since MS SQL Server this feature is integrated in MS Integration Services and more details can be found at the MS knowledge base.

  • We need to access a view on a 32 bit Oracle 9i  - Release 9.2.0.8.0 databas

    Hi
    I don't know if this is the correct forum:
    We need to access a view on a 32 bit Oracle 9i - Release 9.2.0.8.0 database running on Windows 2003 Server, from a MS SQL 2008 R2 64 bit system running on Windows Server 2008 64 bit.
    The DBA for one of the vendors involved has concluded that it is not possible to link from 64 bit MS SQL to a 32 bit Oracle install.
    If it is possible, can you advice what we need to do. Thank you.

    Wrong forum.
    Only solution I can think to actually get to the view.
    1. SQL Server, in TSQL, alllows access to ODBC driver
    2. Use a ODBC driver that can access Oracle (which probably means any SQL driver that will install.)

Maybe you are looking for

  • How to change a labels text which created at runtime?

    hi, i am creating label controls in runtime dynamically and adding them to a group component. this group component is in another custom component and i have lots of custom comp. in my app. my question is how can access (via id) and change a labels te

  • Execute a RFC-Model in another WD-Project

    Hi everybody, my purpose is to execute a RFC-Model in an other WD-Projekt in order to use the result node. WD-Project(A) -references-> WD-Project(B) WD-Project(A) executed the RFC-Model in WD-Project(B) which is only used by WD-Project(A) . I provide

  • Customer Complaints Processing.

    Hi, I am trying to do cusotmer complaints processing. For this I have defined the Reasons for complaints with the abbrivation RETN for the sales document type RE (Return) and given a tick mark for the changeable and check qty. and the followup docume

  • Some notes no longer appear under Reminders Notes in Mail

    On upgrading to Snow Leopard it appears that around 50% of my notes no longer appear under the Reminders>Notes heading in the Mail sidebar. I keep various notes in other folders – such as passwords/login details in their own specific folder – but in

  • Payables Invoice Approval AME Setups

    We have a requirement where, If Invoice_amount >= 0, the approval should go to a person (employee) who approves all invoices except those that he creates. Only the invoices that he creates should go to his supervisor. And this person who approves all