Jdev 1013  ADF - View Object not bound - Refreshed page not showing ctrls

I have a view object that i am using for input form on a page by exposing in a data control.
When the form is submitted it does some db operation based on user input and comes back.
My problem is when i enter the same page again for doing another operation of the same kind,
i refresh this view object in one of the application module's methods.
When the page shows up eventually, i am not finding the input fields on them.
I guess there is some sort of binding issue to the view object here.
The code in the application module's method to refresh the view module is as simple as:
getVParams().clearCache();
VParamsRowImpl row =
(VParamsRowImpl )getVParams().createRow();
row.setValue(100);
getVParams().insertRow(row);
Any idea why the bindings is not picking up the new row and connecting it to the form?
By the way i am calling the same method when displaying the form for the first time it works. Only
the subsequent calls to the form messes up.
Any help will be much appreciated.

Yes i am calling my custom method in application module. I understood that the same page bindings get invoked in two parts, once when the page is loaded and once when the values are submitted by the user. When the bindings are executed when the user is submitting the data from the page adfFacesContext.postback is true and at that i am not interested in creating the new row again by calling my method. Hence this condition in invokeAction. When i debug, the methods are getting called properly. Only when the page is rendered again, it is not picking up the new row.
I am working around this now, by creating the row only once from the appmodule's method and then reusing the same created row in subsequent loadings by resetting the attributes alone.

Similar Messages

  • ADF panel does not prompt for variable defined in ADF view object.

    I have created an ADF Panel, which allows the user to run a few simple queries against an Oracle database done using ADF view objects and ADF view links and ADF application module.
    One of these queries lookup detail information about a given database object (Table, view or whatever) from dba_objects. The SQL uses a parameter (:P_OBJ_NAME) that has a default value of “Departments”. If I run the ADF application module by itself outside of the ADF panel, all works fine, it prompts me to provide a value for the parameter :P_OBJ_NAME.
    As I said the panel contains the different ADF view links including the one that should prompt the user to provide a value for :P_OBJ_NAME. When I run the panel it does not prompt me for :P_OBJ_NAME, it just uses the default defined value “departments”.
    I hope I described my problem for every one to understand. The question obviously is how do I get the ADF panel to prompt the user to provide a value for parameter :P_OBJ_NAME, my expectation was that since the sql in the view object and the application module both are designed to prompt for a value for this parameter then the panel should do just that but it does not.
    You expert input would be most appreciated.
    Thanks.
    Bobby A.
    Edited by: Babak Akbari on Aug 13, 2009 8:34 AM
    Edited by: Babak Akbari on Aug 13, 2009 11:12 AM

    The prompting for a parameter is a feature we built into the ADF Tester - it is not a default behavior you get in your application when you just place a VO on your page.
    To get something like this expend the operations node under the VO in the data control palette, and drag the "Execute with parameters" operation to your page to drop it as a parameter form.
    This will provide your user a place to fill out the parameter and press a button to execute the query.

  • ADF View Object Capability

    Usually I use ADF View Object when I want to view data from table in Oracle DB.
    Now can View Object extract data from file? xml or csv format?
    Regards
    Erich

    Hi,
    no, ViewObjects work with queries against the database.
    Frank

  • ADF - View Objects

    Hi All,
    We are working on building a web application using on ADF.
    The landing page of our application is a dashboard screen that is read-only with 100 to 500 records displayed in a table.
    User can move to other pages and create requests.
    1) When user is on dashboard and moves to other pages of the application, is there a way to release the memory used by view objects and underlying entity objects used by the views used to display the dashboard? Another point here is, our application requirement is to refresh the data from database when user moves between screens. Even if user switches back to dashboard screen after moving to other screen the data needs to be queried anyway. So for better memory management of the application we would like to release the memory for GC when user leaves our dashboard screens.
    Another question I have is:
    2) When a application module passivation occurs, will there be a snapshot taken for all view rows and entity caches or will it be only for pending DB state - entities added/modified/deleted? - We have lot of cases in our application where we display read-only dashboards and I am trying to understand if we can turnoff the passivation on view objects used to display read-only data if passivation deals with only pending DB state.
    Please suggest.

    Hi,
    1) When user is on dashboard and moves to other pages of the application, is there a way to release the memory used by view objects and underlying entity objects used by the views used to display the dashboard? Another point here is, our application requirement is to refresh the data from database when user moves between screens. Even if user switches back to dashboard screen after moving to other screen the data needs to be queried anyway. So for better memory management of the application we would like to release the memory for GC when user leaves our dashboard screens.
    Note that premature optimization can be contra-productive and often is the root of all evil. In other words, as long as you don't experience performance problems, I would let the framework do its job - so be careful wanting too much without a reason. Anyway, to clear the entity cache (and this is the only memory you need to bother for) you can call  <ApplicationModuleInstance>.getTransaction().clearEntityCache(String entityName);
    clearEntityCache
    public void clearEntityCache(java.lang.String entityName)
    Clears the cache of the specified Entity Object. A value of null clears the caches of all Entities. If a View Object uses the Entity Object, the View Object's cache will be cleared as well.
    Parameters:
    entityName - the name of the entity whose cache is to be cleared. If null, caches for all entities are cleared.
    Another question I have is:
    2) When a application module passivation occurs, will there be a snapshot taken for all view rows and entity caches or will it be only for pending DB state - entities added/modified/deleted? - We have lot of cases in our application where we display read-only dashboards and I am trying to understand if we can turnoff the passivation on view objects used to display read-only data if passivation deals with only pending DB state.
    Passivation is for pending changes only and not for all queried data. You define passivation on the AM level and you can switch it off there. In this case I suggest you use an Application Module that speacifically holds the dashboard queries.
    Since performance is your concern I recommend you reading:
    Advanced View Object Techniques - 11g Release 1 (11.1.1.7.0)
    Tuning Application Module Pools and Connection Pools - 11g Release 1 (11.1.1.7.0)
    Frank

  • How do I obtain the next number for a Primary Key using an ADF View Object?

    I have two separate View Objects (A & B) for the same Entity Object. View Object A does a SELECT on all of the fields in the table. This View Object is where I execute my adds and updates. View Object B is only used to retrieve the next number for the primary key. This is done so that when I add a row to the database, I always get the max number of the primary key and add one to it. I accomplished this by setting the SQL mode to Expert and using the SQL: "SELECT MAX(NBR) AS MAX_NUMBER FROM TABLE_1". This may be overkill having a seperate View Object for this, but so far this is the only way I have found to obtain the next number. However, I have discovered that this way does not always work.
    The problem I'm running into is when I try to add multiple records to View Object A without committing the transaction between each add. Because View Object B is disconnected from View Object A, the MAX_NUMBER of View Object B comes back with the same number for each add I do on View Object A. So I know I must retrieve the MAX_NUMBER from View Object A.
    I've tried using the following code in my Table1ViewImpl class:
    this.setQuery("SELECT MAX(Table1.NBR) AS MAX_NUMBER FROM TABLE_1 Table1");
    this.executeQuery();
    The view object now has what I want, but I have yet to figure a way to extract the MAX_NUMBER out of the View Object. I've also looked into using the method addDynamicAttribute() but I can't figure out any way to set the attribute with the MAX_NUMBER.
    I can't be the only one trying to retrieve the next number from a database table using ADF. Can anyone help me with this? FYI - I'm using JDev 10.1.3 EA.

    You missing the point.
    On a multi-user db knowing the next highest number doesn't guarantee the number will be available when it comes time to commit the record. You can prove this to yourself by opening two instances of your app and do whatever you do to add a new record to your VO. Both will assume the same number, and when you commit an error will be generated
    You must use sequences to avoid the possibility of duplicate keys. If you are trying to avoid gaps in your numbering then you need to convince yourself why this is necessary.

  • How to not have your view objects query before the page comes up?

    Hello. I have a view object that is part of a LOV. This view object always gets queried on bringing up the page (I need it to happen on the LOV click) How can I have the VO not queried initially? I tried setting the Iterator to refresh never, but it still does it. Here's the log before the page comes up:
    [363] BindingContext.put( ContactsAMDataControl@irepair_DataBindings_cpx, oracle.jbo.uicli.binding.JUApplication )
    [364] Resolving VO:ContactsVVO1 for iterator binding:ContactsVVO1Iterator
    [365] Changing iterator range size from :1 to :25
    [366] ContactsVVO1 ViewRowSetImpl.execute caused params to be "un"changed
    [367] Column count: 13
    [368] ViewObject: ContactsVVO1 Created new QUERY statement
    [369] ContactsVVO1>#q computed SQLStmtBufLen: 663, actual=623, storing=653
    [370] select
    oc.JOB_TITLE,
    oc.PARTY_SITE_ID,
    RELATIONSHIP_ID ,
    hp.PARTY_NAME OBJECT_NAME, -- Contact
    OBJECT_ID ,
    hr.PARTY_ID ,
    oc.CONTACT_KEY,
    subject_id,
    hp.EMAIL_ADDRESS,
    hp.primary_phone_country_code,
    hp.primary_phone_area_code,
    hp.primary_phone_number
    from HZ_ORG_CONTACT_ROLES ocr,
    HZ_ORG_CONTACTS oc,
    HZ_PARTIES hp,
    HZ_RELATIONSHIPS hr
    where
    hp.party_id = hr.object_id
    and hr.RELATIONSHIP_ID=oc. PARTY_RELATIONSHIP_ID
    and oc.ORG_CONTACT_ID = ocr.ORG_CONTACT_ID(+)
    and relationship_code = 'CONTACT'
    order by OBJECT_NAME
    [371] Bind params for ViewObject: ContactsVVO1
    [372] DCUtil, returning:oracle.adf.model.binding.DCParameter, for ContactsAMDataControl
    [373] LOCALVIEW_USAGE_com_craneae_services_hz_vvo_ContactsVVO_ContactsVVO1 ViewRowSetImpl.execute caused params to be "un"changed
    [374] Column count: 13
    [375] ViewObject: LOCALVIEW_USAGE_com_craneae_services_hz_vvo_ContactsVVO_ContactsVVO1 Created new QUERY statement
    [376] LOCALVIEW_USAGE_com_craneae_services_hz_vvo_ContactsVVO_ContactsVVO1>#q computed SQLStmtBufLen: 663, actual=623, storing=653
    [377] select
    oc.JOB_TITLE,
    oc.PARTY_SITE_ID,
    RELATIONSHIP_ID ,
    hp.PARTY_NAME OBJECT_NAME, -- Contact
    OBJECT_ID ,
    hr.PARTY_ID ,
    oc.CONTACT_KEY,
    subject_id,
    hp.EMAIL_ADDRESS,
    hp.primary_phone_country_code,
    hp.primary_phone_area_code,
    hp.primary_phone_number
    from HZ_ORG_CONTACT_ROLES ocr,
    HZ_ORG_CONTACTS oc,
    HZ_PARTIES hp,
    HZ_RELATIONSHIPS hr
    where
    hp.party_id = hr.object_id
    and hr.RELATIONSHIP_ID=oc. PARTY_RELATIONSHIP_ID
    and oc.ORG_CONTACT_ID = ocr.ORG_CONTACT_ID(+)
    and relationship_code = 'CONTACT'
    order by OBJECT_NAME
    [378] Bind params for ViewObject: LOCALVIEW_USAGE_com_craneae_services_hz_vvo_ContactsVVO_ContactsVVO1
    Thanks!
    Edited by: user621288 on Jun 17, 2009 4:11 PM

    There are two ways:
    1. Uncheck "Query List Automatically" under List UI Hints in the view object overview xml.
    2. In the query add "where 1=:bnum and 1 is not null" and execute the query in the LaunchPopupEvent
        public void userIdId_launchPopupListener(LaunchPopupEvent launchPopupEvent) {
            DCIteratorBinding myListIter = (getItrtBindings("MyLovViewObj1Iterator"));
            ViewObject vo = myListIter.getViewObject();
            NavigatableRowIterator myItemList = myListIter.getNavigatableRowIterator();
            Row row = myItemList.first();
            Object[] val = row.getAttributeValues();
            ViewRowSetImpl vor = (ViewRowSetImpl)val[row.getAttributeCount() - 1];
            vor.setNamedWhereClauseParam("bnum", new BigDecimal(1));
            vor.executeQuery();
        }

  • ADF View objects question

    Hello,
    I created a view object (which bases on an entity object) that I'd like to use for searching for records in a table called "CARS". Cars will be searched by names. I also have a JSP page for adding cars (administration functionality).
    The situation is as follows:
    1. I go to the page for adding cars and click "Submit" (which only submits data without committing to the database).
    2. Then I have validation errors (which is ok because some fields are mandatory).
    3. I search for cars by name.
    The funny part is that if I search for cars with given names, I get those cars AND I get the empty row with this new car I'd tried to add just a moment ago. It's definitely not yet in the database and the name of this car is not set (so it shouldn't match with the name I'm searching for).
    My question is: why is it happening and what should I do to get the rows created but not yet committed not appear in the search results?
    I tried to use clearCache() method of ViewObjectImpl but the result is still the same.
    Please help because I desperately need this for my diploma project.
    Thanks,
    Anna

    I run: "java -Djbo.viewlink.consistent=false -jar oc4j.jar" and I still get new rows. I'm using OC4J 10g (9.0.4.0.0) standalone that comes with JDeveloper 10g (9.0.5.2) on Linux.
    And about that Create pages: I mean I click on a link "New something" 3 times (for example). I don't use the browser back button because I have my menu on each page. In this case I'm just curious if it's possible to somehow "overwrite" previous "new" rows with the most recent one.
    I thought I would need that but now I know I need something else.
    Imagine such a situation:
    1. A user wants to create a new row or update an existing one.
    2. They start filling the form and submit it (in my case it's committing at the same time)
    3. During validation it turns out that some required values are missing so the user has to enter them.
    4. At this point the user leaves the input form and decides to add or update a different row.
    5. The user enters all the required values and this time validation would succeed. However, because of points 2. and 3. it does not.
    Now my question is: how can I make ADF somehow "forget" about the row inserted/updated in point 2. I know that ADF validates all new/changed rows at a time. But I would like to change that behavior so that it would validate only the row changed/created most recently.
    Thanks,
    Anna

  • Using ADF View object create method in Data Action

    I need to know how to create a new row in an application module method and get the attributes from the ADF input form.
    If i Drag drop the create method in the data action form it is working fine. But how to do this programmatically, I have a need where i need to execute a query on another view object and set the create method.
    Thanks.

    Steven:
    (My application does not need to show all records and provide Edit/ Remove buttons at row level, navgational buttons and Create button for inserting new record. Instead, I would just open a blank record for entry, and commit)
    As per your post, I followed the following steps (action class) to insert blank record:
    DCBindingContainer bindings = actionContext.getBindingContainer();
    DCControlBinding binding = bindings.findCtrlBinding("Id");
    Row row = binding.getRowIterator().createRow();
    row.setNewRowState(row.STATUS_INITIALIZED);
    RowSetIterator rs =(RowSetIterator)
    binding.getRowIterator();
    rs.insertRow(row);
    End Results: It works fine and a new blank record is created. The only problem is <html:errors/> in JSP throws error for the first time. I do not want to elliminate error object from JSP.
    Please help!
    Thanks in advance

  • ADF (View Object) with open source database

    Hi all,
    Recently, I am evaluating JDeveloper 9.0.5.2 ADF with an open source database (Firebird).
    I follow the instruction to:
    1. Create an entity object
    2. Create a view object for the entity object in 1
    3. Create an application module for the view object in 2
    4. Right click on the application module and test -> all worked fine
    5. I created a jsp and drag the view (in 2) to it from Data Control Palette
    6. Test it in OC4J -> an error occurred (not because of jdbc config)
    JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT Department.DEPT_NO, Department.DEPARTMENT AS DEPARTMENT1, Department.HEAD_DEPT, Department.MNGR_NO, Department.BUDGET, Department.LOCATION, Department.PHONE_NO FROM DEPARTMENT Department) QRSLT ORDER BY DEPT_NO
    GDS Exception. 335544569. Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 16 SELECT
    To my knowledge, the error should be due to Firebird doesn't support the query syntax " select * (select col1, col2... from table) QRSLT where... order by... "
    I am quite headache as this query is automatically generated by JDeveloper. I am figuring out whether I can change it. It seems that I have to play with the ViewObjectImpl class.
    I do think ADF is an amazing technology. However, is it only so amazing with the Oracle technologies? Please correct me if I am wrong.
    Hons

    Dear Shay Shmeltzer,
    Thank you for your reply. After hours of trying on Firebird, I still get the error:
    JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT Department.DEPT_NO, Department.DEPARTMENT AS DEPARTMENT1, Department.HEAD_DEPT, Department.MNGR_NO, Department.BUDGET, Department.LOCATION, Department.PHONE_NO FROM DEPARTMENT Department) QRSLT ORDER BY DEPT_NO
    GDS Exception. 335544569. Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 16 SELECT
    I then downloaded the MySQL 4.0 and install on my system to do the exact procedures. No error! Thing works fine! Oh man...
    For the Firebird case, a strange thing to note is that the data table (I dragged) contains data, but the error message is on top of it.
    Actually, I don't have a particular database preference but I do hope ADF can work equally for these open-source databases. I think the problem may also be contributed by Firebird. Hope that I can figure it out this week.
    Regards,
    Hons

  • ADF View Object filtering

    Hi, This question is related to ADF table filters.
    Let us take an example of a View Object that is being dropped in a jspx page as a "ADF Table" with filters.
    Whenever user applies a filter on a column, will the data for view object be queried from database once again?
    Is there a way to avoid the query re-execution on applying filters in table.

    Thanks for the replies. Jdeveloper version we use is 11.1.1.6.
    I have a follow up question.
    We have a programmatic View Object which gets data from 3 different rows and populate them in view rows (We have overridden standard methods like executeQueryForCollection..etc)
    The data is displayed in a ADF table.
    Now when the user filters data, normally filter works fine but the web service calls are made every time the filters are applied/removed.
    We would like to avoid making calls to web services when user filters data by setting Query Mode to "QUERY_MODE_SCAN_VIEW_ROWS".
    But what happens is first time filter is applied, the filtered rows are displayed properly but from there on the query collection refers to filtered data only and not the complete data set.
    So when the user removes filter and hits enter again only filtered rows are displayed and not all the rows fetched initially. I am not sure why the query collection looses all the rows and keeps only filtered rows??

  • ADF View object validation. Cannot have same column value multiple time.

    Hi Expert,
    I have a ADF viewobject validation question. I have the Department and employee view objects. Each department have multiple employees. (may be u can also assume. the employee name is an VO attribute not the database field)
    I need to implement the following validation rule
    One department shouldn't have same employee name. How can i implement this validation rule in the ADF-BC.
    Looking forward ur expert suggestions. Thanks
    -t

    Assuming that the employee name (which you have said is a transient attribute) is created by concatenating some other fields, you could, I suppose create a unique index in the DB or a unique validator in the EO to ensure that the department ID (assume you have such an attribute) and the fields that make up the name are unique. It seems kind of unusual to be validating a transient field like this.
    John

  • OAF, View object used with the clausule setWhereClause, show the error  not have been properly initialized.

    Hi to all,
    I'm new with oaf and in mi AM i have to VO that I use to find relative information to the one is shown to the user on a query region, after the user pressed the go buton  the CO request the AM tho load both VO and those information are used to show in a popup region to display and update. the main problem is when the popup region closes it send a submit to the server an the error "View object may not have been properly initialized during Update." is displayed
    The main page and the popup uses the same AM, the initM2mVo() and initTavleVo() are  called by the CO at the processRequest of the main PG, the popup dosen´t have a CO.
    This the AM that uses the main PG and the popup region
    package tasc.oracle.apps.tasc.m2m.imei.server;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    import oracle.apps.fnd.framework.server.OAViewObjectImpl;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    public class ActualizarImeiAMImpl extends OAApplicationModuleImpl {
        /**This is the default constructor (do not remove)
        public ActualizarImeiAMImpl() {
        /*******************************USE FOR CUSTOM CODE****************************/
         * Inicializa el vo a través del cual se ejecutara la actualización del IMEI.
         * @param taskNumber
        public void loadImeiVo(String taskNumber) {
            OAViewObject voTableQry = getTableQryVO1();
            if (voTableQry != null) {
                voTableQry.reset();
                voTableQry.setWhereClause(null);
                voTableQry.setWhereClauseParams(null);
                voTableQry.setWhereClause("TASK_NUMBER = :1");
                voTableQry.setWhereClauseParam(0, taskNumber);
                voTableQry.executeQuery();
                if (voTableQry.hasNext()) {
                    voTableQry.next();
                    String idActuacion =
                        (String)voTableQry.getCurrentRow().getAttribute("IdActuacion");
                    String dsM2m =
                        (String)voTableQry.getCurrentRow().getAttribute("DsM2m");
                    String imei =
                        (String)voTableQry.getCurrentRow().getAttribute("Imei");
                    if (idActuacion != null) {
                        OAViewObjectImpl m2mVo = (OAViewObjectImpl)this.getTascTransEqInstM2mVO1();
                        m2mVo.reset();
                        if (!m2mVo.isPreparedForExecution()) {
                            m2mVo.setMaxFetchSize(0);
                            m2mVo.executeQuery();
                        m2mVo.setWhereClause(null);
                        m2mVo.setWhereClauseParams(null);
                        m2mVo.setWhereClause("ID_ACTUACION = :1 AND DS_M2M = :2 AND IMEI = :3 ");
                        m2mVo.setWhereClauseParam(0, idActuacion);
                        m2mVo.setWhereClauseParam(1, dsM2m);
                        m2mVo.setWhereClauseParam(2, imei);
                        m2mVo.executeQuery();
                        if(m2mVo.hasNext()){
                            m2mVo.next();
         * Carga los valores disponibles de IMEI según el taskNumber al cual pertenezca
         * el  IMEI seleccionado.
        public void loadImeiValuesList(String taskNumber) {
            ViewObject viewobject = this.getImeiListVO1();
            OAViewObject voTableQry = getTableQryVO1();
            if (voTableQry != null && voTableQry.getCurrentRow() != null) {
                String imeiType =
                    (String)voTableQry.getCurrentRow().getAttribute("Attribute17");
                if (viewobject != null & imeiType != null) {
                    viewobject.setWhereClause(null);
                    viewobject.setWhereClauseParams(null);
                    viewobject.setWhereClause("TASK_NUMBER = :1 AND ATTRIBUTE17 = :2");
                    viewobject.setWhereClauseParam(0, taskNumber);
                    viewobject.setWhereClauseParam(1, imeiType);
                    viewobject.executeQuery();
        /*******************************USE FOR CUSTOM CODE****************************/
        /**Container's getter for TableVO1
        public OAViewObjectImpl getTableVO1() {
            return (OAViewObjectImpl)findViewObject("TableVO1");
        /**Sample main for debugging Business Components code using the tester.
        public static void main(String[] args) { /* package name */
            /* Configuration Name */launchTester("tasc.oracle.apps.tasc.m2m.imei.server",
                                                 "ActualizarImeiAMLocal");
        /**Container's getter for TascTransEqInstM2mVO1
        public OAViewObjectImpl getTascTransEqInstM2mVO1() {
            return (OAViewObjectImpl)findViewObject("TascTransEqInstM2mVO1");
        /**Container's getter for ImeiListVO1
        public OAViewObjectImpl getImeiListVO1() {
            return (OAViewObjectImpl)findViewObject("ImeiListVO1");
        /**Container's getter for TableQryVO1
        public OAViewObjectImpl getTableQryVO1() {
            return (OAViewObjectImpl)findViewObject("TableQryVO1");
    this is the CO of the main PG
    /*===========================================================================+
    |   Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA    |
    |                         All rights reserved.                              |
    +===========================================================================+
    |  HISTORY                                                                  |
    +===========================================================================*/
    package tasc.oracle.apps.tasc.m2m.imei.webui;
    import java.io.Serializable;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.TransactionUnitHelper;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean;
    * Controller for ...
    public class ActualizarImeiCO extends OAControllerImpl {
        public static final String RCS_ID = "$Header$";
        public static final boolean RCS_ID_RECORDED =
            VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
         * Layout and page setup logic for a region.
         * @param pageContext the current OA page context
         * @param webBean the web bean corresponding to the region
        public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
            super.processRequest(pageContext, webBean);
            //get the handle to AM Attached to our Simple Page Region MainRegionRN
            //The page is passed as parameter to this method, hence we can get handle
            //to the AM quite easily
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            //verifica si la transaccion de creacion esta activa todavia
            if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext,"ActualizarImeiM2m", false))
                // deshace cambios y finaliza Txn
                am.invokeMethod("rollback");
                TransactionUnitHelper.endTransactionUnit(pageContext, "ActualizarImeiM2m");
         * Procedure to handle form submissions for form elements in
         * a region.
         * @param pageContext the current OA page context
         * @param webBean the web bean corresponding to the region
        public void processFormRequest(OAPageContext pageContext,
                                       OAWebBean webBean) {
            super.processFormRequest(pageContext, webBean);
            //get the handle to AM Attached to our Simple Page Region MainRegionRN
            //The page is passed as parameter to this method, hence we can get handle
            //to the AM quite easily
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            //Detección del botón go de la región de query.
            this.queryButonGO(pageContext, webBean, am);
            this.updateImei(pageContext, am);
         * Detección del botón go de la región de query
         * @param pageContext
         * @param webBean
         * @param am
        public void queryButonGO(OAPageContext pageContext, OAWebBean webBean,
                                 OAApplicationModule am) {
            OAQueryBean queryBean =
                (OAQueryBean)webBean.findIndexedChildRecursive("QueryRN");
            String idGo = queryBean.getGoButtonName();
            if (pageContext.getParameter(idGo) != null) {
                String tareaId = pageContext.getParameter("TaskNumberLovInput");
                //Inicializa el vo a través del cual se ejecutara la actualización del IMEI.
                Serializable[] parameters2 = { tareaId };
                Class[] paramTypes2 = { String.class };
                am.invokeMethod("loadImeiVo", parameters2, paramTypes2);
                //Carga los valores disponibles de IMEI según el taskNumber al cual pertenezca  el  IMEI seleccionado.
                Serializable[] parameters = { tareaId };
                Class[] paramTypes = { String.class };
                am.invokeMethod("loadImeiValuesList", parameters, paramTypes);
        public void updateImei(OAPageContext pageContext, OAApplicationModule am){
            if (pageContext.getParameter("ActualizarImei") != null){
                String imei = pageContext.getParameter("ImeiPopup");
                //TODO......
    thanks to all.

    I thing I got the problem.
    I have the following configuration:
    One Main Page and external RN that is call as popup in main page
    2 VO, queries by java code, one to capture some information that is used to query the 2 VO that I use to update information by the popup.
    One AM that is map only in the Main Page. (Initially I had the external RN mapped to same AM as the main PG, but I remove it).
    The solution was remove the mapping of the AM from the external region and in the messageimput of the external region set the View instance and view Attribute manually in this fields (http://screencast.com/t/uDTALEedCh do not use the wizard ) as the one instanced am the AM, so the problem it seem that was that defining an AM to the external region create a new instance, causing that it can not see the information that I load manually in the VO by query it them.
    for this case there is not need to use the next code, because the Rows are load with information by the query in the java code, this only will have to be made when inserting a new row .
        public void initM2mVo(){
            //get a handle to the View Object that we wish to initialize
            OAViewObject vo = (OAViewObject)this.getTascTransEqInstM2mVO1();
            if (!vo.isPreparedForExecution()) {
                vo.setMaxFetchSize(0);
                vo.executeQuery();
            //Create a blank Row
            Row row = vo.createRow();
            //Attach that blank row to the VO. Data will be fed into this row, when the user types into the fields
            vo.insertRow(row);
            //Set the status of the blank row to initialized. This tells OA Framework that record is blank and must not be included in DML
            //Operations until    changes are made to its underlying VO [via screen fields]
            row.setNewRowState(Row.STATUS_INITIALIZED);

  • View Object Transient attribute, refresh problem.

    I have a VO which contains 3 entities joined. I added it a transient attribute with Groovy expression. My expression is : ReplyView.count("ReplyId"); , it counts two VO relationship. it counts normally but, when i insert a new reply, it doesnt refresh/update/recalculate the value. Whats the problem?

    The dependency values referred to are accessed when you edit the transient attribute in the view object. On the left hand panel select dependencies and shuttle the columns that the transient is dependent on. I don't think this matters for non-entity based views since the SQL is fixed but for entity based views this assures the dependent columns are added to the query even if they are not needed by the page.
    http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcentities.htm#ADFFD20177

  • Questions on ADF View Objects, Links and Iterators

    I have a number of questions regarding using ViewObjects in applications where there are alot of relationships between tables.
    First, lets say that I have ViewObject SomeView that was added to the App Module (AM) as VO1. And because it has a number of "detail" records that have to be iterated through in a "report like" view it has those other VO's added under it as "children" in the AM.
    So I have
    VO1 (an instance of SomeView)
    --> VO2 (an instance of some other view)
    --> VO3 (an instance of some other view)
    that is used on pages where only a single VO1 is shown at a time.
    Now because I had another page I wanted to make that had a listing of all SomeView objects. Some of the fields in SomeView are foreign keys to records in VO2 and VO3 and while I don't want to show all the fields from VO2 and VO3, I do want to show a name field from each rather than just the foreign key.
    My experience (though I've never read this anywhere) tells me that when doing a "table" that is a list of rows from a VO, you can't display info from the child VO's because the child VO's are on whatever record corresponds to the "currentRow" in the parent VO and just displaying the rows in a rangeSet doesn't make each the "currentRow" so even we display 10 records in a for loop, the "currentRow" is just one, and the child VO's iterators aren't moved as we go through the for loop. (Can someone confirm if I am correct on this conclusion????)
    So the only way I know of to show some field from a related table in each row is to make the VO have the entity objects from the related tables be part of the view as references. Is this the only way?
    If I do that on a view that didn't have other views as children defined in the AM I don't have any problem and it works like I want.
    But if I do it on a view that did have other views as children defined in the AM it makes the page(s) using that view with the children iterators behave badly. Half the information quits showing up, etc.
    For example, ... if I go to the "SomeView" which was defined with only one entity object association, and I add the entity objects (that are the basis of instances of VO2 and VO3 ) as referenceable only, it totally breaks the page where I display a single VO1 and use it's VO2 and VO3 children. IS THIS NORMAL OR AM I MISSING SOMETHING?
    So, is the solution that I have to have more view objects defined for different purposes ?
    Can anyone give any general guidelines for when/where to use different view objects vs. when to use different iterators. I'm not having much luck with using secondary RSI's and haven't found much info on them.
    Also, how about issues of naming iterators that are in various binding containers (ie. UI Model for a page). If I do and LOV it creates an iterator and gives it a default name like ViewNameIterator1. If I already have a different page that uses a regular (non LOV) iterator with that name, and the user goes back and forth between those pages, is that a clash?
    Finally, I've read a couple of Steve Muench's blogs on View Link consistency but I'm not sure what the rules are on when it applies and doesn't. How you turn it on or off, etc. One of his examples in http://radio.weblogs.com/0118231/2004/02/27.html talks about it in the context of two view objects that are NOT typically "linked" in a master/detail kind of way. Like an AllDepartments and a DepartmentsLessThan view. Do you have to create a View Link between them to have results of one be reflected in the other if they aren't used in the same page in a web app? Or does it happen automatically (with the caveat that you have to do the rowQualifies method). Just feels like I'm missing some pieces.
    Thanks in advance,
    Lynn

    Hi,
    I am also interested in a best-practice note from oracle.
    Currently we store history in seperate history tables for columns that changed. All this implemented in our BaseEoImpl overriding the EntityImpl.prepareForDML().
    Thanks

  • How To change the ADF View Object  query where-clause at RunTime?

    I am trying to create a simple display page which will display user data (username, assoc_dist_id, assoc_agent_id, status , etc). The User data is stored in a database table and i am using an ADF Read Only table based on the View Object to display the data on the JSF page.
    However, i want to display only the users that a particular person accessing the page has the AUTH LEVEL to see. e.g. If the person accessing the page is an 'ApplicationAdministrator' then the page should display all users in the table, If its a 'DistributorAdministrator' then the page should display only users associated with that Distributor (i.e. assoc_dist_id = :p_Dist_id ) and If its an 'AgentAdministrator' , then the page should display only users associated with that Agent ( i.e. assoc_agent_id = :p_Agent_id).
    Currently my af:table component displays all the users in the table because the query for the view object is (select * from users) . However, i want to use the same viewobject and just set the where-clause at runtime with the appropriate parameter to restrict the dataset returned.
    Do anyone knows how to accomplish this ?

    David,
    See the custom method initializeDynamicVariableDefaults() in the SRViewObjectImpl.java class in the FrameworkExtentions project in the SRDemoSampleADFBC sample application. You can find out how to install the demo if you haven't already from the ADF Learning Center at:
    http://www.oracle.com/technology/products/adf/learnadf.html
    This class is a framework extension class for view objects that adds a neat, generic feature to be able to dynamic default the value of named bind variables. You can read more about what framework extension classes are and how to use them in Chapter 25, "Advanced Business Components Techniques" of the ADF Developer's Guide for Forms/4GL Developers, also available at the learning center above.
    It is an example of generic framework functionality that "kicks in" based on the presence of custom metadata properties on a named bind variable. See section 25.3.3 "Implementing Generic Functionality Driven by Custom Properties" in the dev guide for more details. Using this sample code, if you add a bind variable to a view object, and define a custom metadata property named "DynamicDefaultValue" on that bind variable, and set this custom metadata property to the value "CurrentUser", then that bind variable will have its value dynamically defaulted to the name of the authenticated user logged in. If instead you set this custom property to the value "UserRole", then the bind variable will be set to the comma-separated string containing the list of roles that the authenticated user is part of.
    Once you've created a framework extension class for view objects like this, you can have the view objects you create inherit this generic functionality.See section 25.1.4 "How to Base an ADF Component on a Framework Extension Class" in the dev guide for more info on this.
    By adapting a technique like this (or some idea similar that better suits your needs) you can have your view object query contain bind variables whose values automatically take on the defaults based on something in the user-session environment.

Maybe you are looking for

  • Error while dropping a job

    SQL> SELECT JOB FROM DBA_JOBS; JOB 1 SQL> EXEC DBMS_JOB.REMOVE(1); BEGIN DBMS_JOB.REMOVE(1); END; ERROR at line 1: ORA-23421: job number 1 is not a job in the job queue ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86 ORA-06512: at "SYS.DBMS_IJOB", line 5

  • How in Flash CS4 to change text words of .fla file from a website template?

    I have a website template in which I am trying to change the header text words and menu text words to customize the template. How do I do this in Flash CS4? Thanks!

  • Creating IPA file with Multiple SWF files using ADT

    Iam successfully able to create ipa files using the ADT package but my next requirement is to create an IPA file with multiple swf files.I think it might be easy if your SWF files are regular the tough part is my swf file has lot of action script in

  • Auto-launch Java classes from deliveries

    I need to launch custom java class from deliveries like described in this article (http://oraclebizint.wordpress.com/2007/12/17/oracle-bi-ee-101332-calling-java-scripts-and-java-classes-from-ibots/). The problem is that I want to launch my java code

  • Change oracle word size (32 bit to 64 bit oracle on Solaris 10 OS)

    Hi Folks, I have installed Oracle Ebusiness Suite 11i on Solaris 10 platform (Sparc) The default installation comes with oracle 9i database which is 32bit size. Now I want to upgrade it to Oracle 10.2.0.2 64 bit. Should I perform the 'normal' databas