Problem with a View Object

Hi,
I am using ADF BC technology.
I've got a curious for me problem...
I get from a creation form a code that the user enter, a method in the app. module checks
using the view object if the code exists or not...
The code always Exist! Debugging I found out that the code that is found is the code that the user tries to enter...
Am I missing something?
    public String add() {
        BindingContainer bindings = getBindings();
         if (bindings != null) {
            OperationBinding operationBinding = bindings.getOperationBinding("checkKbExam");
             operationBinding.getParamsMap().put("code",inputText2.getValue());
             Boolean  result = (Boolean) operationBinding.execute();
            System.out.println("balame gia code: "+ inputText2.getValue());
            System.out.println("pirame apo appmodule: "+result );
            if(result==false){
                FacesContext context = FacesContext.getCurrentInstance();
                operationBinding =
                        (OperationBinding)bindings.getOperationBinding("getMsg");
                operationBinding.getParamsMap().put("msgId", "5");
                String msg = (String)operationBinding.execute();
                FacesMessage message1 =
                    new FacesMessage(msg);
                context.addMessage(null, message1);
                return"null";
             OperationBinding operationBinding1 =bindings.getOperationBinding("Commit");
             operationBinding1.execute();
    public boolean checkKbExam(String code) {
       checkKbExamImpl check  = getcheckKbExam1();
       check.setTheGivenCode(code);     
       check.executeQuery();
       Row[] row = check.getAllRowsInRange();
       getcheckKbExam1().setCurrentRow(row[0]);
       System.out.println(row[0].getAttribute("RefCodeSystem"));
       try{
           System.out.println(row[1].getAttribute("RefCodeSystem"));
        catch(Exception e){
        System.out.println("error "+ e);
       if (row.length>0) {
          System.out.print("mikos einai  " + row.length);
          return false;
         return true;
    }

No solution yet guys ...and it's really annoying!
When i put a "code" that does not exists in the table...the array length is 1.
When it exists it's again 1 !!!!
so what does it leave me?
pls somebody help

Similar Messages

  • Problem with 2 View Objects based on One Entity -Probably a Bug in ADF BC

    Hi
    I am using JDeveloper 10.1.3(SU5) and adf faces and ADF BC and to explain my problem I use HR schema.
    First, I created 2 view objects based on countries table named as TestView1 and TestView2. I set TestView1 query where clause to region_id=1 and TestView2 query where clause to region_id!=1 in the view object editor and then I created 2 separated form on these 2 view objects by dragging and dropping from data control palette.
    Now when I insert a record in the form based on TestView1 with region_id set to 1 and commit the record and go to the next form I can see the record in the second form which is completely wrong since it is against the where clause statement of the second form.
    I am really confused and the situation is very wired and it seems to me something like bug in adf bc.Am I right.Is there any work around or solution for solving this problem.
    Any help would be highly appreciated.
    Best Regards,
    Navid

    Dear Frank,
    Thank you very much for your quick response.
    Reading your helpful comments now I have some questions:
    1- I have commited the record in the database so shouldn't the query of view objects be re-queried?
    2- We try to use ClearVOCaches (entity_name,false) in afterCommit of the base entity object but unfortunately it does not work correctly. after that,We got root app module and used findViewObject method to find all the view of that entity (we have found them by using name not automaticlly) and called executeQuery of all views. From my point of view it has 2 big disadvantages. First suppose that this entity is an important entity and 4 or 5 viow objects are based on it. Now, For inserting one record we should re-execute 4 or 5 view which I think makes some performance issues. Besides, If during the development one programmer add a new view object based on this entity and don't add the executeQuery in the afterCommit for this view, again we have the same problem. Isn't there at least a way that automatically refresh all related view objects however the performance issue still exists.
    3- You mentioned that this issue is handled in the developer guide. Could you kindly give me a refrence which developer guide you mean and which section I should read to overcome this problem.(I have ADF Developer's Guide for Forms/4GL Developer's Guide , however I search for clearVOCaches and surprisingly nothing was found!!!)
    4- Could you please give me some hints that from your point of view what is the best method to solve this problem with minimum performance effect.
    Any comment would be of some great help.
    Thanks in advance,
    Navid

  • BC Archive - problem with opening view object based on entity from archive

    We have encountered a weird problem with a reusable BC library on different PCs.
    Library was imported into a project following steps in section 25.7 of the ADF guide.
    A view object was created using some of the entities from the library.
    Model tested successfully with view object (using AppModule tester).
    Page developed with no problems.
    Application copied to a different PC.
    BC JAR files set up in lib folder and removed/readded to application model project. When attempting to open view object, get the error below.
    However, the View object still tests successfully using the AppModule tester.
    The page using the View object still runs successfully.
    I believe the problem is that when the archive was originally imported, it was imported from a different location. The Containees tag in the project .jpx file references that path name. But even when I edited the path name, I still could not open the view object. Do we have to remove and redo the import of the library each time the application is copied to a different machine?
    Error when attempting to edit View Object:
    oracle.jbo.dt.objects.JboException: The following object(s) referred to objects that could not be found:
    com.guideworkstv.ibo.webstagemodel.AcctReqForReviewViewObj
    com.guideworkstv.ibo.webstagemodel.AcctReqForReviewViewObj
    Could not find the following referenced object(s):
    com.guideworkstv.ibo.model.webstage.entities.IboAccountRequest
    com.guideworkstv.ibo.model.webstage.entities.IboAccountRequest
         at oracle.jbo.dt.objects.JboException.throwException(JboException.java:81)
         at oracle.jbo.dt.objects.JboPackage.loadResolveReferencesXML(JboPackage.java:1397)
         at oracle.jbo.dt.objects.JboPackage.finishObjectsLoad(JboPackage.java:1042)
         at oracle.jbo.dt.objects.JboPackage.loadFromXMLFile(JboPackage.java:972)
         at oracle.jbo.dt.objects.JboPackage.loadFromXMLFile(JboPackage.java:951)
         at oracle.jbo.dt.objects.JboBaseObject.loadFromXMLFile(JboBaseObject.java:2615)
         at oracle.jbo.dt.objects.JboPackage.loadFromXMLFile(JboPackage.java:880)
         at oracle.jbo.dt.objects.JboPackage.checkForLoad(JboPackage.java:451)
         at oracle.jbo.dt.objects.JboPackage.findContainedObjectByName(JboPackage.java:440)
         at oracle.jbo.dt.objects.JboPackage.findObjectByName(JboPackage.java:1999)
         at oracle.jbo.dt.objects.JboApplication.findObjectByName(JboApplication.java:959)
         at oracle.jbo.dt.objects.JboUtil.fileURLToObject(JboUtil.java:510)
         at oracle.jbo.dt.jdevx.ui.JdxJboAddin$1.handleCopy(JdxJboAddin.java:997)
         at oracle.jdeveloper.compiler.CopyTranslator.handledByListeners(CopyTranslator.java:125)
         at oracle.jdeveloper.compiler.CopyTranslator.translate(CopyTranslator.java:263)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildGraph(UnifiedBuildSystem.java:300)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProjectFiles(UnifiedBuildSystem.java:516)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProject(UnifiedBuildSystem.java:609)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildAll(UnifiedBuildSystem.java:666)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.run(UnifiedBuildSystem.java:894)

    We have resolved this problem by making sure that all machines have identical paths for both the working and the lib directories. It would be nice not to have to do this though.

  • Facing lot of problems with the DATA object  -- Urgent

    Hi,
    I am facing lot of problems with the data object in VC.
    1. I created the RFC initially and then imported the data object in to VC. Later i did some modifications to RFC Function module,and when i reload the data object, I am not able to see the new changes done to RFC in VC.
    2. Even if i delete the function module, after redeploying the IVIew, results are getting displayed.
    3. How stable is the VC?
      I restarted the sql server and portal connection to R3 is also made afresh.... still i am viewing such surprise results..
    please let me know what might be the problem.

    Hi Lior,
    Are u aware of this problem.
    If yes, please let me know...
    Thanks,
    Manjunatha.T.S

  • Master-detail with dynamic view object

    How can you create a view link with a view object that is dynamic? I have created a master-detail relationship on a UIX page. I change the master view object at runtime using a view definition and SQL and then I bind the view object to an iterator on a UIX page. I need the new dynamic view object to maintain the link between the detail view object. Is this possible?
    The reason why I have to change the view object at runtime is because I am implementing a search module and the tables in the from clause can be modified at runtime so I need to have a dynamic view object.
    Thanks,
    Sanjay

    After playing around with ViewObjectImpl's setQuery() method some more I found out that this solution might not work for me due to the following reason: when the user tries to sort a column in the result table, the original contents of the view object get executed instead of the run time query.
    <p>
    I would like to go back to my original solution that included creating a view definition based on the runtime query and then creating a view object from that which I bind to the RowSetIterator. The missing piece to the master-detail functionality is with the detail Iterator being in sync with the master. I have tried the following but I get a ClassCastException <p>
    DCIteratorBinding detailBinding = ctx.getBindingContainer().findIteratorBinding("DetailIterator");
    detailBinding.getViewObject().<b>setMasterRowSetIterator</b>(masterBinding.getRowSetIterator());
    <p>
    here is the relevant stack trace:
    java.lang.ClassCastException
    at oracle.jbo.client.remote.ViewUsageImpl.getImplObject(ViewUsageImpl.java:1829)
    at oracle.jbo.client.remote.RowSetImpl.setMasterRowSetIterator(RowSetImpl.java:512)
    at oracle.jbo.client.remote.ViewUsageImpl.setMasterRowSetIterator(ViewUsageImpl.java:1147)
    at oracle.jbo.common.ws.WSViewObjectImpl.setMasterRowSetIterator(WSViewObjectImpl.java:1005)

  • Problem with a view in XK01 transaction

    Hi All,
    I am working on upload conversion for Vendor Master. While doing conversion, i am getting a problem with a Contact person view in XK01 transaction. In contact person view the telephone field column sometimes allowing to add data ,sometimes it's not allowing data which results an error in conversion program saying that the telephone field in not an input field. I don't know why the view is showing the telephone field like that.
    Can any one suggest the solution for this problem. I know this is configuration problem with a view but i posted in ABAP forums.
    Thanks

    Hi Ben,
    I assume that you are writing a BDC program to upload contact person information. If so, you are trying to populate a table control here. Please check to see if you are calculating the index to assign values to the correct rows.
    if you are calculating index in your program then i think it should be configuration problem as you said.
    Thanks,
    Ganesh.

  • Problem with HTML viewer

    Dear All ,
    I am facing a problem with HTML Viewer . My senario is as follows :
    1. I have created one HTML page . On that page there are 4 Images
    2. I imported that HTML page in SAP with the help of transaction SMW0
    3. I Called that HTML page in my ABAP program using the method "load_html_document" of class cl_gui_html_viewer
    4. This is happening perfectly ok on the machine on which all this developement was done.
    But the issue is when I execute my ABAP program on a different machine , those Images on that HTML page are not displaying.
    Can you please guide me how to remove that machine dependancy?
    Regards,
    Nikhil

    Hi Nikhil,
    Please check if the image is properly imported properly. Also check if there is any option which you might have forgotten while imported like dependeency.
    Regards
    Abhii...

  • Problem with database schema objects in the entity object wizard

    Hi All,
    When creating a new entity object, I am facing a problem with database schema objects in the entity object wizard, database schema objects (check boxes for tables,synonyms...) are disabled. Actually I am using a synonym but I am not able to select the synonym check box.
    Can any of you folks tell me how to enable the database schema objects (check boxes for tables,synonyms...).
    Thanks in Advance.
    Raja.M

    Make sure your using rite version of jdeveloper..
    Make sure your using apps schema and check whether your able perform DML operations in the schema vis sql developer.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                           

  • Problem with Copied Business Object : SELFITEM

    Hi,
    sub:    Problem with Copied Business Object : SELFITEM
    I want to use changed selfitem BOR for carbon copy functionality. For it, i copied the BOR : SELFITEM. it is giving error
    In SWI2_DIAG it is showing like this.
    Work item  cannot be read                                                
    Work item 000000639770: Object  method SWW_BI_EXECUTE_S cannot be executed
    The problem is with COPYING The Business Object. Because , generally we extend BOR ,not copy. But i did copy.
    Please help me regarding this.
    Balaji.T.

    hi Martin,
    The problem may not be in method. because simply we copied the BO:SELFITEM into ZSELF . And i want to test this for a mail at first , whether copied BOR  is working or not.The mail is not triggering . it is saying that it is Error.
    WF_BATCH error...
    I can see error in Tx: SWI2_DIAG ,
    this is Error :
    Work item 000000639770: Object  method SWW_BI_EXECUTE_S cannot be executed
    Once it is rectified i can modify the method in BO:ZSELF.
    Thank you in Advance..
    Balaji.T.

  • Problem with Materialized Views after an export

    Hi @ everybody,
    At an Oracle 11g R2 (11.2.0.3.0) instance, all actual CPU's/SPU's are installed, on a Red Hat 6 Machine i have a problem with Materialized Views from a schema, which i have exportet from an old database machine on Oracle 10g (10.2.0.1.0) to the new machine.
    I've exportet with the old exp and imported with imp, because i know, that i get some strange errors because of the materialized views when i'm using the new expdp and impdp tools.
    At the old machine the materialized views are so programmed, that they get an update of data at a defined time like this:
    START WITH TRUNC(SYSDATE) + 21/24
          NEXT SYSDATE+1
    ...But after the export this "update function" of the materialized view is not available. So i have deleted that views and recreated them with the START WITH parameters. So now they are running.
    But why do i have this problem?
    Is this "START WITH" somewhere written as a job or so in, for example, DBMS_SCHEDULER or something else? So i had forgotten to export these jobs or where is that defined?
    Is this a bug?
    Thanks for answers and help!
    Best regards,
    David

    I can't remember the error of expdp/impdp. That is some days ago, i have to rebuild this.
    I think in my scenario for the import i don't need the TABLE_EXISTS_ACTION, because by importing at the new server i've just createt the naked tablespace for the data and the users, not more. So he didn't has something to overwrite.
    And i have to tell you: i'm just the dbA. The desining of the tables and materialized views is many years ago by installing the old server. I'm just to young in my company to know about the design of the instance and why it was designed so.
    Anyway: my problem is, that after the import of the schemas to a new server the "START WITH" option in the materialized views is not there anymore and i just want to why so i can think about a solution for that and create it with the database designers of my company.
    EDIT: And here are the SQL Statements for creating the Materialized Views:
    First, at the OLD Server (Oracle 10g 10.2.0.1.0)
      CREATE MATERIALIZED VIEW "DUPONT_CCG2_P"."PR_PRODUCT_ITEMS"
      ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "DUPONT_14523"
      BUILD IMMEDIATE
      USING INDEX
      REFRESH COMPLETE ON DEMAND START WITH sysdate+0 NEXT SYSDATE+1
      USING DEFAULT LOCAL ROLLBACK SEGMENT
      DISABLE QUERY REWRITE
      AS (SELECT DISTINCT
          PR_CUSTOMER_MASTER_DATA.CLIENT_ID,
          PR_CUSTOMER_MASTER_DATA.ILN_USER,
          PR_ARTICLE.EAN,
          PR_ARTICLE.CODE,
          PR_USED_ARTICLE_TEXT.ARTICLE_TEXT,
          PR_USED_ARTICLE_TEXT.LANG_CODE,
          PR_ARTICLE.SUP_ITEM_NO,
          PR_ARTICLE.OLD_ITEM_NO,
          PR_COMPANY_ITEM_MATCH.ITEM_BY_NO,
          PR_COMPANY_ITEM_MATCH.UOM_UNIT,
          PR_COMPANY_ITEM_MATCH.PRICE_UOM,
          PR_COMPANY_ITEM_MATCH.PRICE,
          PR_COMPANY_ITEM_MATCH.CURRENCY,
          PR_COMPANY_ITEM_MATCH.PRICE_QTY,
          PR_COMPANY_ITEM_MATCH.SALES_UNIT,
          PR_COMPANY_ITEM_MATCH.START_DATE,
          PR_COMPANY_ITEM_MATCH.END_DATE,
          PR_ARTICLE.UPDATED_AT
            FROM PR_ARTICLE, PR_COMPANY_ITEM_MATCH, PR_USED_ARTICLE_TEXT, PR_CUSTOMER_MASTER_DATA, PR_ADDRESS
            WHERE PR_ADDRESS.ORDER_TYPE='REP'
          AND PR_CUSTOMER_MASTER_DATA.ILN_USER=PR_ADDRESS.ILN_USER
          AND PR_COMPANY_ITEM_MATCH.ILN_USER=PR_ADDRESS.ILN_LINK
          AND PR_CUSTOMER_MASTER_DATA.SALES_ORG=PR_COMPANY_ITEM_MATCH.SALES_ORG
          AND PR_CUSTOMER_MASTER_DATA.CLIENT_ID=PR_COMPANY_ITEM_MATCH.CLIENT_ID
          AND PR_CUSTOMER_MASTER_DATA.CLIENT_ID=PR_ADDRESS.CLIENT_ID
          AND PR_ARTICLE.SUP_ITEM_NO=PR_COMPANY_ITEM_MATCH.SUP_ITEM_NO
          AND PR_COMPANY_ITEM_MATCH.SALES_ORG=PR_USED_ARTICLE_TEXT.SALES_ORG
          AND PR_ARTICLE.SUP_ITEM_NO=PR_USED_ARTICLE_TEXT.SUP_ITEM_NO
          AND PR_CUSTOMER_MASTER_DATA.LANG_CODE=PR_USED_ARTICLE_TEXT.LANG_CODE
          AND ( PR_COMPANY_ITEM_MATCH.END_DATE IS NULL OR to_date(PR_COMPANY_ITEM_MATCH.END_DATE,'YYYYMMDD') - sysdate > 0)
          AND ( PR_COMPANY_ITEM_MATCH.START_DATE IS NULL OR sysdate - to_date(PR_COMPANY_ITEM_MATCH.START_DATE,'YYYYMMDD') > 0)
    )And here the at the NEW Server (Oracle 11g R2 11.2.0.3.0)
      CREATE MATERIALIZED VIEW "DUPONT_CCG2_P"."PR_PRODUCT_ITEMS" ("CLIENT_ID", "ILN_USER", "EAN", "CODE", "ARTICLE_TEXT", "LANG_CODE", "LANR", "OLD_LANR", "ITEM_BY_NO", "UOM_UNIT", "PRICE_UOM", "PRICE", "CURRENCY", "PRICE_QTY", "SALES_UNIT", "START_DATE", "END_DATE", "UPDATED_AT")
      ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
    NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "DUPONT_14523"
      BUILD IMMEDIATE
      USING INDEX
      REFRESH COMPLETE ON DEMAND START WITH sysdate+0 NEXT SYSDATE+1
      USING DEFAULT LOCAL ROLLBACK SEGMENT
      USING ENFORCED CONSTRAINTS DISABLE QUERY REWRITE
      AS (SELECT DISTINCT
          PR_CUSTOMER_MASTER_DATA.CLIENT_ID,
          PR_CUSTOMER_MASTER_DATA.ILN_USER,
          PR_ARTICLE.EAN,
          PR_ARTICLE.CODE,
          PR_USED_ARTICLE_TEXT.ARTICLE_TEXT,
          PR_USED_ARTICLE_TEXT.LANG_CODE,
          PR_ARTICLE.SUP_ITEM_NO,
          PR_ARTICLE.OLD_ITEM_NO,
          PR_COMPANY_ITEM_MATCH.ITEM_BY_NO,
          PR_COMPANY_ITEM_MATCH.UOM_UNIT,
          PR_COMPANY_ITEM_MATCH.PRICE_UOM,
          PR_COMPANY_ITEM_MATCH.PRICE,
          PR_COMPANY_ITEM_MATCH.CURRENCY,
          PR_COMPANY_ITEM_MATCH.PRICE_QTY,
          PR_COMPANY_ITEM_MATCH.SALES_UNIT,
          PR_COMPANY_ITEM_MATCH.START_DATE,
          PR_COMPANY_ITEM_MATCH.END_DATE,
          PR_ARTICLE.UPDATED_AT
            FROM PR_ARTICLE, PR_COMPANY_ITEM_MATCH, PR_USED_ARTICLE_TEXT, PR_CUSTOMER_MASTER_DATA, PR_ADDRESS
            WHERE PR_ADDRESS.ORDER_TYPE='REP'
          AND PR_CUSTOMER_MASTER_DATA.ILN_USER=PR_ADDRESS.ILN_USER
          AND PR_COMPANY_ITEM_MATCH.ILN_USER=PR_ADDRESS.ILN_LINK
          AND PR_CUSTOMER_MASTER_DATA.SALES_ORG=PR_COMPANY_ITEM_MATCH.SALES_ORG
          AND PR_CUSTOMER_MASTER_DATA.CLIENT_ID=PR_COMPANY_ITEM_MATCH.CLIENT_ID
          AND PR_CUSTOMER_MASTER_DATA.CLIENT_ID=PR_ADDRESS.CLIENT_ID
          AND PR_ARTICLE.SUP_ITEM_NO=PR_COMPANY_ITEM_MATCH.SUP_ITEM_NO
          AND PR_COMPANY_ITEM_MATCH.SALES_ORG=PR_USED_ARTICLE_TEXT.SALES_ORG
          AND PR_ARTICLE.SUP_ITEM_NO=PR_USED_ARTICLE_TEXT.SUP_ITEM_NO
          AND PR_CUSTOMER_MASTER_DATA.LANG_CODE=PR_USED_ARTICLE_TEXT.LANG_CODE
          AND ( PR_COMPANY_ITEM_MATCH.END_DATE IS NULL OR to_date(PR_COMPANY_ITEM_MATCH.END_DATE,'YYYYMMDD') - sysdate > 0)
          AND ( PR_COMPANY_ITEM_MATCH.START_DATE IS NULL OR sysdate - to_date(PR_COMPANY_ITEM_MATCH.START_DATE,'YYYYMMDD') > 0)
    )The own differences i can see is at the "header". In the new one is the NOCOMPRESS LOGGING Option and in the first line the code has the columns diretcly defined.
    But, i think, for my problem this line is determining:
      REFRESH COMPLETE ON DEMAND START WITH sysdate+0 NEXT SYSDATE+1And this line is the same at both server.
    Edited by: David_Pasternak on 12.04.2013 00:06

  • Problems with Street View

    new street view from new google map release shows black screen

    I'm having similar problems with Street View on openSUSE. For the time being you can try to switch back to the classic Google Maps.
    https://support.google.com/maps/answer/3045828?hl=en&ref_topic=3093612

  • Problem in ADF Tree When I use 2 Tree in a Page with same View Object !

    Hi everybody,
    I use JDeveloper 11.1.1.5 and ADF Faces in UI . I have 2 tree in a page that they are from same Updatable View Object but diffrent instances in application module . When I change an attribute value from one of them in manage Bean programmatically , both of them change??!! in my case I put a checkbox in nodeStamp, when user click on checkbox, title of row must change but title in both of them change?????
    I think it is a bug.
    please help me. Thanks

    >
    so what is diffrent to use same view object instances in page or multiple instances when we need ??
    >
    Actually, this depends on your use case. suppose you have a view object with a bind variable, and you want to display to tables on the same page but with different query result depending on the bind variable, in this case you have to create two view instances.
    check
    http://andrejusb.blogspot.com/2011/06/understanding-adf-bc-view-object.html

  • Problem in using View Object for validation

    Hi,
    I have defined a simple swing form to practice. It has one Entity Object and two View objects. One of these view objects is an updatable VO based on the EO and the other one has a simple "select count(*)" from a table. I defined a method validation on one of the EO attributes to see how can i use the VO for validation. On the other hand i defined the Application Module to use both of my views. As far as i undrestood, when i define a VO for AM, the AM will instantiate it the first time it starts running. Here is the code inside the method validation for FirstName attribute:
    /**Validation method for FirstName
    public boolean validateFirstName(String data) {
    ViewObject vo = getDBTransaction().getRootApplicationModule().findViewObject("CountEmployeeInstance");
    if (vo == null) {
    System.out.println("vo is null");
    else {
    vo.executeQuery();
    if (vo.hasNext()){
    System.out.println("count = " + ((CountEmployeeRowImpl) vo.next()).getCount());
    else {
    System.out.println("vo has no next");
    return true;
    The problem is that vo.executeQuery() does not return any record. In fact the vo.hasNext() returns false and i get the message "vo has no next" on the console. Please pay attention that the VO's sql statement is SELECT COUNT(*) and it always returns a record. I found that if i use vo.closeRowSet() before vo.executeQuery() everything works fine.
    Please tell me that what is my problem and why is it working like this?
    Best Regards,
    Alireza Vali

    Chris,
    1- Every thing is fine with the ADF model layer in this practice. I have tested it by using Test option on AM and it works. It works exactly the same as how it works throug swing UI that i use for it.
    2- The VO is beeing found and as you see in the code, i have tested it by "if (vo == null)" just after the statement which finds it and vo is not null which means it has been instantiated by AM as it was supposed to.
    3- The VO's SQL statement is "SELECT COUNT(*) FROM EMPLOYEE" with no where clause. I have 14 records in this table.
    Every thing is OK with swing form. It runs and shows the records and all the binded operations like "next record", "previous record" and so on work perfectly on the records.
    4- The code i used is a combination of two examples. Example 9-7 and 9-8 in pages 9-12 and 9-13 of mentioned document.
    Now my findings:
    I changed the code to the following:
        /**Validation method for FirstName
        public boolean validateFirstName(String  data) {
            ViewObject vo = getDBTransaction().getRootApplicationModule().findViewObject("MaxEmployeeIdInstance");
            if (vo == null) {
                System.out.println("vo is null");
            else {
                //vo.closeRowSet();
                vo.executeQuery();
                System.out.println("Row Count = " + vo.getRowCount());
                System.out.println("Default Slot = " + vo.getCurrentRowSlot());
                vo.next();
                System.out.println("Slot after next() = " + vo.getCurrentRowSlot());
                vo.reset();
                System.out.println("Slot after reset() = " + vo.getCurrentRowSlot());
                vo.first();
                System.out.println("Slot after first() = " + vo.getCurrentRowSlot());
                vo.last();
                System.out.println("Slot after last() = " + vo.getCurrentRowSlot());
                System.out.println("----------------------");
                vo.executeQuery();
                System.out.println("Deafault index = " + vo.getCurrentRowIndex());
                vo.next();
                System.out.println("Index after next() = " + vo.getCurrentRowIndex());
                vo.reset();
                System.out.println("Index after reset() = " + vo.getCurrentRowIndex());
                vo.first();
                System.out.println("Index after first() = " + vo.getCurrentRowIndex());
                vo.last();
                System.out.println("Index after last() = " + vo.getCurrentRowIndex());
                System.out.println("Slot Before First = " + vo.SLOT_BEFORE_FIRST);
                System.out.println("Slot Beyound Last = " + vo.SLOT_BEYOND_LAST);
            return true;
        }Here are the results :
    Row Count = 1
    Default Slot = 0
    Slot after next() = 3
    Slot after reset() = 0
    Slot after first() = 0
    Slot after last() = 0
    Deafault index = 0
    Index after next() = -1
    Index after reset() = 0
    Index after first() = 0
    Index after last() = 0
    Slot Before First = 2
    Slot Beyound Last = 3
    As you see, after the execution of the statement "vo.executeQuery()" the The RowIterrator pointer is not pointing to the slot before the first record but it is pointing to the first record itself. And that is why the statement "if (vo.hasNext()" returns false because we just have one record and RowIterrator Index is standing on that record and there is no next record present. The very important thing is that even reset() method does not set the index to the slot before the first record and it sends it to the first record.
    After that, i took the statemet "vo.closeRowSet()" out of the comment and here are the results:
    Row Count = 1
    Default Slot = 2
    Slot after next() = 0
    Slot after reset() = 2
    Slot after first() = 0
    Slot after last() = 0
    Deafault index = -1
    Index after next() = 0
    Index after reset() = -1
    Index after first() = 0
    Index after last() = 0
    Slot Before First = 2
    Slot Beyond Last = 3
    These are the exact things that we expected from the first. After query execution, the pointer is set to the slot before first record and the reset() method does its defined job which is sending the pointer to the slot before the the first record.
    My Assumptions:
    The Rowset which is created by AM is somehow different from the RowSet which you create in your program. I am absolutely sure that this functionality is not a bug but a design decission. I look at my simple program and see that when it runs, the data is queried and shown on the screen which is all done by AM by instantiating my VO and executing the query on it. AM reasonably must put the RowSet pointer on the first record and not the slot before first record. And i am sure that if i use reset() method on the shown RowSet, the pointer goes to the first record and the data on the screen does not get cleared. Whe we use vo.closeRowSet() and execute the query again, the AM made RowSet is closed and a new one is created and the new RowSet is your's not AM's so it functions as you expect.
    Best Regards,
    Alireza Vali

  • Problems creating extension (View Object) in JDeveloper 9.0.3.5

    Note: I originally posted this on the JDeveloper forum - but I was told to post it in this forum.
    This is on Windows XP Pro SP2 with JDeveloper 9.0.3.5 - patch 6469392 (appropriate for 11.5.10.6).
    I'm trying to create an extension for a view object for the Oracle Applications Framework. I've exported the appropriate MDS repo contents to my system using export. One of the first issues I've seen is the step where I import the the business components XML file (server.xml) and I get the following warning:
    Warning: This Business Components Package was built with an earlier version of Oracle Business Components for Java. Unable to upgrade since it is readonly. oracle.apps.pos.isp.server
    I've encountered these strange "readonly" errors all along the way. When I try to create the VO itself, I notice the wizard is in readonly mode, preventing me from associating query columns with view attributes (I cannot change a view attribute for a query column for many of the query columns). Why are things in readonly mode?

    I've seen is the step where I import the the business components XML file (server.xml) and I get the following warning:
    Warning: This Business Components Package was built with an earlier version of Oracle Business Components for Java. Unable to upgrade since it is readonly. oracle.apps.pos.isp.server
    Ans : VO , EM and AM related xml files not need to import to MDS, only PG and Region related xml file need to import to MDS.

  • Lightroom 4.2 - Experiencing problems with images viewed on 2nd monitor

    Hi All,
    This problem seems to have started with my updating from 4.1 to 4.2.  I have my second monitor set as Loupe - Normal and Fit.  As I crop an image on my main monitor, the 2nd monitor view does not always change to the cropped view.  If I switch to a different photo and then back to the one I just cropped, the 2nd monitor view will then show the cropped image, but it is almost always blurry.  Sometimes I can click the image in the 2nd monitor view to change to a 1:1 view and it will look sharp, and then click again back to Fit and then it too will be sharp.  Other times I get a message in the 2nd monitor view that says "no image selected" and bouncing back and forth between a different image will correct this.
    This all started off with the majority, but not all cropped images showing as blurred and progressed to what I have described above.  I seriously though I had a focus problem with my camera!
    Is anyone else experinecing this since updating?  Suggestions?
    Below is the suggested information to provide...
    What version of Lightroom? 4.2
    Have you installed the recent updates? Yes, 4.2
    What operating system? Windows 7 Ultimate 64 bit
    What kind(s) of image file(s)? All images are converted to .dng upon import
    If you are getting error message(s), what is the full text of the error message(s)? No error messages.
    What were you doing when the problem occurred? I am in the develop module cropping images etc.
    What other software are you running? Silver Efex Pro 2, but I have had that installed in many prior versions of Lightroom
    Tell us about your computer hardware. How much RAM is installed? 32 GB - Yes, I know - overkill... 
    How much free space is on your system (C:) drive? 119 GB of 223 GB of my solid state drive c:\
    Has this ever worked before? Yes
    If so, do you recall any changes you made to Lightroom, such as adding Plug-ins, presets, etc.? No other changes other than updating to 4.2
    Did you make any changes to your system, such as updating hardware, printers or drivers, or installing/uninstalling any programs?  No, no other changes.
    Thanks!

    Same problem.   Not a soloution, but this may be relevant.
    http://forums.adobe.com/message/4782916#4782916
    Alan

Maybe you are looking for

  • RE-FX and FM/BCS integration

    When trying to post a funds reservation via a lease in contract I get error Message no. FMEF009   -  Entry in field Unlimited not allowed; check the field control  Has anyone implemented RE-FX with Public Sector and committed via contracts

  • Ssl doesn't work

    can't access any of https websites including even the login screen for this forum (now accessing from ie). always the same answer: Safari can't open the page "https://support.apple.com/cgi-bin/WebObjects/ACAuthWeb.woa/wa/login?appIdKey=2dd bca23a85d2

  • TabNavigator Problem

    Hi I have quite a complex component within my Flex 2 application-. The component consists of numerous tabs within a tabNavigator- and each tab contains a dataGrid that displays data from a webService relevant to the selected tab. This is quite diffic

  • Cucm web gui

    trying to setup a home lab to study for the ccna voice cert. i installed cucm 8.6 on vmware workstation and worked fine. i was able to get to the login page but when i login with the admin account, none of the navigation buttons are dropdowns like th

  • Training Centers in Hyderabad

    Hi any suggestions on institutes in hyderabad for cert preparation on microsoft windows 7 and server 2008? planing to write certs by next month rahul